/* PDF Reader — prototype styles.
   Everything is scoped under .pdfr so WordPress themes can't leak in (or out). */

.pdfr {
  --pdfr-font: inherit;
  --pdfr-card: #ffffff;
  --pdfr-stage: #f0f0ee;
  --pdfr-surface: #f3f3f1;
  --pdfr-surface-2: #e7e7e4;
  --pdfr-line: rgba(17, 18, 20, .08);
  --pdfr-text: #111214;
  --pdfr-muted: #6b6e75;
  --pdfr-faint: #a3a5aa;
  --pdfr-ink: #111214;
  --pdfr-on-ink: #ffffff;
  --pdfr-accent: #d9f26a;
  --pdfr-focus: #3b6cf6;
  --pdfr-glass: rgba(255, 255, 255, .62);
  --pdfr-glass-text: #111214;
  --pdfr-glass-ring: rgba(255, 255, 255, .5);
  --pdfr-skeleton: #e8e8e5;
  --pdfr-skeleton-hi: #f4f4f2;
  --pdfr-shadow: 0 0 0 1px rgba(17, 18, 20, .045), 0 1px 2px rgba(17, 18, 20, .04), 0 24px 48px -24px rgba(17, 18, 20, .2);
  --pdfr-page-shadow: 0 0 0 .5px rgba(17, 18, 20, .06), 0 1px 2px rgba(17, 18, 20, .05), 0 14px 34px -16px rgba(17, 18, 20, .26);
  --pdfr-ambient: .5;
  --pdfr-fs-bg: #e9e9e7;
  --pdfr-r: 28px;
  --pdfr-pad: 8px;
  --pdfr-page-r: 8px;
  --pdfr-ease: cubic-bezier(.22, .8, .24, 1);
  --pdfr-dur: .48s;

  position: relative;
  display: block;
  width: 100%;
  color: var(--pdfr-text);
  font-family: var(--pdfr-font);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-anchor: none;
  outline: none;
}

.pdfr[data-theme="dark"] {
  --pdfr-card: #18191b;
  --pdfr-stage: #0f1011;
  --pdfr-surface: #222326;
  --pdfr-surface-2: #313236;
  --pdfr-line: rgba(255, 255, 255, .08);
  --pdfr-text: #f2f2f0;
  --pdfr-muted: #a1a3a9;
  --pdfr-faint: #6c6f75;
  --pdfr-ink: #f2f2f0;
  --pdfr-on-ink: #111214;
  --pdfr-glass: rgba(22, 23, 26, .55);
  --pdfr-glass-text: #f2f2f0;
  --pdfr-glass-ring: rgba(255, 255, 255, .1);
  --pdfr-skeleton: #232427;
  --pdfr-skeleton-hi: #2d2e32;
  --pdfr-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 48px -24px rgba(0, 0, 0, .7);
  --pdfr-page-shadow: 0 0 0 .5px rgba(0, 0, 0, .4), 0 14px 34px -14px rgba(0, 0, 0, .7);
  --pdfr-ambient: .3;
  --pdfr-fs-bg: #0b0b0c;
}
@media (prefers-color-scheme: dark) {
  .pdfr[data-theme="auto"] {
    --pdfr-card: #18191b;
    --pdfr-stage: #0f1011;
    --pdfr-surface: #222326;
    --pdfr-surface-2: #313236;
    --pdfr-line: rgba(255, 255, 255, .08);
    --pdfr-text: #f2f2f0;
    --pdfr-muted: #a1a3a9;
    --pdfr-faint: #6c6f75;
    --pdfr-ink: #f2f2f0;
    --pdfr-on-ink: #111214;
    --pdfr-glass: rgba(22, 23, 26, .55);
    --pdfr-glass-text: #f2f2f0;
    --pdfr-glass-ring: rgba(255, 255, 255, .1);
    --pdfr-skeleton: #232427;
    --pdfr-skeleton-hi: #2d2e32;
    --pdfr-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 48px -24px rgba(0, 0, 0, .7);
    --pdfr-page-shadow: 0 0 0 .5px rgba(0, 0, 0, .4), 0 14px 34px -14px rgba(0, 0, 0, .7);
    --pdfr-ambient: .3;
    --pdfr-fs-bg: #0b0b0c;
  }
}

/* ---------- resets (themes love to style buttons and images) ---------- */
.pdfr *, .pdfr *::before, .pdfr *::after { box-sizing: border-box; }
.pdfr :where(div, span, p, aside, strong, form, label, ol, ul, li) { line-height: inherit; letter-spacing: inherit; text-transform: none; text-shadow: none; }
.pdfr button {
  appearance: none; -webkit-appearance: none;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; color: inherit;
  font: inherit; line-height: 1; letter-spacing: normal; text-transform: none; text-decoration: none;
  min-width: 0; min-height: 0; width: auto; height: auto;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.pdfr button:disabled { cursor: default; opacity: .32; }
.pdfr .pdfr-shell img, .pdfr .pdfr-modal img { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.pdfr :focus-visible { outline: 2px solid var(--pdfr-focus); outline-offset: 2px; }
.pdfr:focus-visible { outline: 2px solid var(--pdfr-focus); outline-offset: 4px; border-radius: var(--pdfr-r); }
.pdfr .pdfr-i { display: block; flex: none; width: 20px; height: 20px; fill: currentColor; }
.pdfr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- card shell ---------- */
.pdfr-shell {
  position: relative;
  display: flex;
  background: var(--pdfr-card);
  border-radius: var(--pdfr-r);
  padding: var(--pdfr-pad);
  box-shadow: var(--pdfr-shadow);
  transition: height var(--pdfr-dur) var(--pdfr-ease);
}
.pdfr[data-layout="wide"] .pdfr-shell { flex-direction: row; gap: var(--pdfr-pad); }
.pdfr[data-layout="compact"] { --pdfr-r: 26px; --pdfr-pad: 6px; --pdfr-page-r: 12px; }
.pdfr[data-layout="compact"] .pdfr-shell { flex-direction: column; }

/* ---------- stage ---------- */
.pdfr-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--pdfr-r) - var(--pdfr-pad));
  background: var(--pdfr-stage);
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: auto;
  user-select: none; -webkit-user-select: none;
}
.pdfr.is-ready .pdfr-stage { cursor: default; }
.pdfr.is-dragging .pdfr-stage, .pdfr.is-panning .pdfr-stage { cursor: grabbing !important; }
.pdfr[data-layout="compact"] .pdfr-stage {
  flex: none;
  height: 200px;
  transition: height var(--pdfr-dur) var(--pdfr-ease);
}

.pdfr-track { position: absolute; inset: 0; }
.pdfr-slide {
  position: absolute;
  inset: 0;
  display: flex;
  padding: var(--pdfr-sp, 24px);
  overflow: hidden;
  transition: transform var(--pdfr-dur) var(--pdfr-ease), opacity var(--pdfr-dur) var(--pdfr-ease);
  will-change: transform;
}
.pdfr-slide.is-zoomed {
  overflow: auto;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.pdfr-slide.is-zoomed::-webkit-scrollbar { display: none; }
.pdfr-page {
  position: relative;
  flex: none;
  margin: auto;
  background: #fff;
  border-radius: var(--pdfr-page-r);
  box-shadow: var(--pdfr-page-shadow);
  overflow: hidden;
}
/* adaptive phone card: pages sit at the top so the card grows downward */
.pdfr[data-layout="compact"][data-frame="adaptive"]:not(.is-fs):not(.is-fill) .pdfr-page { margin: 0 auto auto; }
.pdfr-slide.is-enter .pdfr-page { animation: pdfr-pop .34s var(--pdfr-ease); }

.pdfr-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--pdfr-skeleton) 30%, var(--pdfr-skeleton-hi) 50%, var(--pdfr-skeleton) 70%) 0 0 / 300% 100%;
  animation: pdfr-shimmer 1.3s linear infinite;
  transition: opacity .3s ease;
}
.pdfr-page.is-ready::before { opacity: 0; animation: none; }
.pdfr .pdfr-page img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .28s ease;
  -webkit-user-drag: none;
  pointer-events: none;
}
.pdfr-page.is-ready img { opacity: 1; }

/* soft colour glow from the current page (wide layout only) */
.pdfr-ambient { position: absolute; inset: -12%; z-index: -1; pointer-events: none; }
.pdfr-ambient i {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  filter: blur(56px) saturate(1.5);
  opacity: 0;
  transition: opacity .9s ease;
}
.pdfr-ambient i.is-on { opacity: var(--pdfr-ambient); }
.pdfr[data-layout="compact"] .pdfr-ambient { display: none; }

/* ---------- floating stage tools (zoom, fit, full screen) ---------- */
.pdfr-glass {
  background: var(--pdfr-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--pdfr-glass-ring);
  color: var(--pdfr-glass-text);
}
.pdfr-tools {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pdfr-card) 90%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 0 0 1px var(--pdfr-line), 0 10px 28px -10px rgba(0, 0, 0, .35);
  color: var(--pdfr-text);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .3s var(--pdfr-ease);
}
.pdfr.is-ready .pdfr-stage:hover .pdfr-tools,
.pdfr.is-ready .pdfr-tools:focus-within,
.pdfr.is-ready.is-zoomed .pdfr-tools,
.pdfr.is-ready.is-fs .pdfr-tools {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
@media (hover: none) {
  .pdfr.is-ready[data-layout="wide"] .pdfr-tools { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
}
.pdfr.is-dragging .pdfr-tools,
.pdfr[data-layout="compact"]:not(.is-zoomed):not(.is-fs) .pdfr-tools { opacity: 0 !important; pointer-events: none !important; }
.pdfr-tools button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  transition: background .15s ease;
}
.pdfr-tools button:hover:not(:disabled), .pdfr-tools button.is-on { background: rgba(127, 127, 127, .16); }
.pdfr-tools .pdfr-zoom-label {
  width: auto;
  min-width: 54px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pdfr-tools .pdfr-i { width: 19px; height: 19px; }
.pdfr-sep { width: 1px; height: 18px; margin: 0 4px; background: currentColor; opacity: .16; }
.pdfr[data-layout="compact"] .pdfr-tools { bottom: 10px; }
.pdfr[data-layout="compact"] .pdfr-fitw,
.pdfr[data-layout="compact"] .pdfr-tools [data-act="fullscreen"],
.pdfr[data-layout="compact"] .pdfr-sep { display: none; }

.i-fsx { display: none !important; }
.pdfr.is-fs .i-fs { display: none !important; }
.pdfr.is-fs .i-fsx { display: block !important; }

/* ---------- loading / error ---------- */
.pdfr-state {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
}
.pdfr.is-loading .pdfr-state, .pdfr.is-error .pdfr-state { display: grid; }
.pdfr-loading { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.pdfr-skel {
  width: min(64%, 560px);
  aspect-ratio: 16 / 9;
  border-radius: var(--pdfr-page-r);
  background: linear-gradient(100deg, var(--pdfr-skeleton) 30%, var(--pdfr-skeleton-hi) 50%, var(--pdfr-skeleton) 70%) 0 0 / 300% 100%;
  animation: pdfr-shimmer 1.3s linear infinite;
}
.pdfr[data-layout="compact"] .pdfr-skel { position: absolute; inset: 0; width: auto; aspect-ratio: auto; border-radius: 0; }
.pdfr[data-layout="compact"] .pdfr-loading { position: absolute; inset: 0; justify-content: center; }
.pdfr-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--pdfr-card);
  color: var(--pdfr-muted);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--pdfr-line);
}
.pdfr-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: pdfr-spin .8s linear infinite;
}
.pdfr-error { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 400px; }
.pdfr-error > .pdfr-i { width: 30px; height: 30px; color: var(--pdfr-muted); margin-bottom: 4px; }
.pdfr-error strong { font-size: 16px; font-weight: 600; }
.pdfr-error p { margin: 0; color: var(--pdfr-muted); font-size: 13.5px; line-height: 1.55; }
.pdfr-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.pdfr .pdfr-btns .pdfr-btn:not(.pdfr-btn--ink) { background: var(--pdfr-card); box-shadow: 0 0 0 1px var(--pdfr-line); }
.pdfr:not(.is-ready) .pdfr-foot, .pdfr:not(.is-ready) .pdfr-bar,
.pdfr:not(.is-ready) [data-act="grid"], .pdfr:not(.is-ready) [data-act="download"] { opacity: .4; pointer-events: none; }
.pdfr .pdfr-btns .pdfr-btn { height: 40px; padding: 0 16px 0 14px; font-size: 13px; }
.pdfr-btns .pdfr-i { width: 18px; height: 18px; }

/* ---------- side panel (wide layout) ---------- */
.pdfr-side {
  position: relative;
  display: none;
  flex: 0 0 var(--pdfr-panel-w, 320px);
  min-width: 0;
  flex-direction: column;
  --pdfr-overlap: 26px;
}
.pdfr[data-layout="wide"] .pdfr-side { display: flex; }
.pdfr-cover {
  position: relative;
  flex: 0 0 var(--pdfr-cover-h, 128px);
  overflow: hidden;
  border-radius: calc(var(--pdfr-r) - var(--pdfr-pad));
  background: var(--pdfr-stage);
}
.pdfr .pdfr-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .6s ease, transform 1.2s var(--pdfr-ease);
}
.pdfr .pdfr-cover img.is-ready { opacity: 1; transform: none; }
.pdfr-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0) 50%);
  pointer-events: none;
}
.pdfr-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.pdfr-chip .pdfr-i { width: 16px; height: 16px; }
.pdfr .pdfr-round {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.pdfr .pdfr-round:active:not(:disabled) { transform: scale(.94); }
.pdfr-cover .pdfr-round { position: absolute; top: 10px; right: 10px; z-index: 1; width: 32px; height: 32px; }
.pdfr-cover .pdfr-round .pdfr-i { width: 18px; height: 18px; }

.pdfr-sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: calc(-1 * var(--pdfr-overlap));
  padding: 16px 10px 2px;
}
.pdfr-sheet-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pdfr-sheet-bg path { fill: var(--pdfr-card); }
.pdfr-sheet > :not(.pdfr-sheet-bg) { position: relative; }
.pdfr .pdfr-notch {
  position: absolute;
  right: 10px;
  top: calc(var(--pdfr-cover-h, 128px) - var(--pdfr-overlap) - 22px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--pdfr-ink);
  color: var(--pdfr-on-ink);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
  transition: transform .2s var(--pdfr-ease);
}
.pdfr .pdfr-notch .pdfr-i { width: 18px; height: 18px; }
.pdfr .pdfr-notch:hover { transform: translateY(-1px); }
.pdfr .pdfr-notch:active { transform: scale(.95); }
.pdfr.no-download .pdfr-notch, .pdfr.no-download [data-act="download"] { display: none; }
.is-busy .pdfr-i { animation: pdfr-pulse .9s ease-in-out infinite; }

.pdfr-head { padding: 0 4px 12px; margin-bottom: 0; border-bottom: 1px solid var(--pdfr-line); }
.pdfr-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 54px;
  font-size: 12px;
  color: var(--pdfr-muted);
  white-space: nowrap;
}
.pdfr-meta span { overflow: hidden; text-overflow: ellipsis; }
.pdfr-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--pdfr-accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.pdfr.is-error .pdfr-dot { background: #e5484d; }
.pdfr-title {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.012em;
  color: var(--pdfr-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.pdfr-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 -4px;
  padding: 6px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--pdfr-surface-2) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.pdfr .pdfr-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 8px 6px 6px;
  border-radius: 14px;
  text-align: left;
  transition: background .15s ease;
}
.pdfr .pdfr-row { width: 100%; }
.pdfr .pdfr-row:hover { background: var(--pdfr-surface); }
.pdfr .pdfr-row[aria-current="true"] { background: var(--pdfr-surface); }
.pdfr-thumb { display: grid; place-items: center; flex: 0 0 56px; height: 42px; }
.pdfr-thumb i, .pdfr-cell-box i {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--pdfr-skeleton);
  border-radius: 3px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 2px 6px -2px rgba(0, 0, 0, .2);
}
.pdfr-thumb i { width: 100%; }
.pdfr .pdfr-thumb img, .pdfr .pdfr-cell-box img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .3s ease;
}
.pdfr .pdfr-thumb img.is-ready, .pdfr .pdfr-cell-box img.is-ready { opacity: 1; }
.pdfr .pdfr-row-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.pdfr .pdfr-row-title { font-size: 13px; font-weight: 500; color: var(--pdfr-text); }
.pdfr .pdfr-row-sub { font-size: 12px; color: var(--pdfr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.pdfr .pdfr-row-num { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pdfr-faint); font-variant-numeric: tabular-nums; }
.pdfr .pdfr-row[aria-current="true"] .pdfr-row-num { color: var(--pdfr-text); font-weight: 500; }
.pdfr .pdfr-row[aria-current="true"] .pdfr-row-num::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pdfr-ink);
}

.pdfr-foot { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 2px; border-top: 1px solid var(--pdfr-line); }
.pdfr-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  border-radius: 20px;
  background: var(--pdfr-surface);
}
.pdfr .pdfr-play {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--pdfr-card);
  color: var(--pdfr-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.pdfr .pdfr-play .pdfr-i { width: 18px; height: 18px; }
.pdfr .pdfr-play .i-pause { display: none; }
.pdfr.is-playing .pdfr-play .i-play { display: none; }
.pdfr.is-playing .pdfr-play .i-pause { display: block; }
.pdfr-ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.pdfr-ring circle {
  fill: none;
  stroke: var(--pdfr-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  opacity: 0;
}
.pdfr.is-playing .pdfr-ring.is-run circle { opacity: 1; animation: pdfr-ring var(--pdfr-interval, 4s) linear forwards; }

.pdfr .pdfr-range {
  --p: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline-offset: 4px;
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.pdfr .pdfr-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--pdfr-muted) calc(8px + var(--p) * (100% - 16px)), var(--pdfr-surface-2) 0);
}
.pdfr .pdfr-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  border-radius: 50%;
  border: 1px solid var(--pdfr-muted);
  background: var(--pdfr-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .15s ease;
}
.pdfr .pdfr-range:active::-webkit-slider-thumb { transform: scale(1.15); }
.pdfr .pdfr-range::-moz-range-track { height: 3px; border-radius: 3px; background: var(--pdfr-surface-2); }
.pdfr .pdfr-range::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--pdfr-muted); }
.pdfr .pdfr-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--pdfr-muted); background: var(--pdfr-card); }
.pdfr .pdfr-range:focus-visible { outline-offset: 4px; border-radius: 4px; }
.pdfr-count { flex: none; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--pdfr-muted); white-space: nowrap; }

.pdfr-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pdfr .pdfr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--pdfr-surface);
  color: var(--pdfr-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.pdfr .pdfr-btn { height: 44px; padding: 0 14px; display: inline-flex; text-decoration: none; border: 0; box-shadow: none; }
.pdfr .pdfr-btn .pdfr-i { width: 18px; height: 18px; }
.pdfr .pdfr-btn:hover:not(:disabled) { background: var(--pdfr-surface-2); }
.pdfr .pdfr-btn:active:not(:disabled) { transform: scale(.98); }
.pdfr .pdfr-btn--ink { background: var(--pdfr-ink); color: var(--pdfr-on-ink); }
.pdfr .pdfr-btn--ink:hover:not(:disabled) { background: var(--pdfr-ink); opacity: .86; }

/* ---------- compact layout (phones, narrow columns) ---------- */
.pdfr-info { display: none; padding: 12px 8px 2px; }
.pdfr[data-layout="compact"] .pdfr-info { display: block; }
.pdfr-segs { display: flex; gap: 3px; height: 3px; margin: 2px 2px 14px; }
.pdfr-segs i { flex: 1; border-radius: 3px; background: var(--pdfr-surface-2); transition: background .3s ease; }
.pdfr-segs i.is-on { background: var(--pdfr-ink); }
.pdfr-segs.is-bar { border-radius: 3px; background: var(--pdfr-surface-2); }
.pdfr-segs.is-bar i { flex: none; width: calc(var(--p, 0) * 100%); background: var(--pdfr-ink); transition: width .3s var(--pdfr-ease); }
.pdfr-row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 0 4px; }
.pdfr-src { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--pdfr-muted); }
.pdfr-src .pdfr-i { width: 16px; height: 16px; }
.pdfr-src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfr-actions { display: flex; gap: 0; margin-right: -4px; }
.pdfr .pdfr-ghost {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--pdfr-text);
  transition: background .15s ease;
}
.pdfr .pdfr-ghost:hover { background: var(--pdfr-surface); }
.pdfr-info .pdfr-title { margin-top: 0; padding: 0 4px; font-size: 17px; }
.pdfr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 6px;
  border-radius: 20px;
  background: var(--pdfr-surface);
}
.pdfr-bar .pdfr-round { width: 44px; height: 44px; background: var(--pdfr-card); color: var(--pdfr-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .07); }
.pdfr-bar .pdfr-round--ink { background: var(--pdfr-ink); color: var(--pdfr-on-ink); }
.pdfr-bar .pdfr-round .pdfr-i { width: 22px; height: 22px; }
.pdfr-bar-mid { display: flex; align-items: center; gap: 12px; }
.pdfr-bar-mid .pdfr-count { font-size: 14px; color: var(--pdfr-text); }

/* grid sheet (all pages) */
.pdfr-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--pdfr-text);
}
.pdfr-modal[hidden] { display: none; }
.pdfr-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 12, .4); animation: pdfr-fade .25s ease; }
.pdfr-gridsheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 84%;
  padding: 8px 14px 14px;
  border-radius: 26px 26px 0 0;
  background: var(--pdfr-card);
  box-shadow: 0 -12px 40px -12px rgba(0, 0, 0, .3);
  animation: pdfr-up .38s var(--pdfr-ease);
}
.pdfr-grabber { width: 36px; height: 4px; margin: 2px auto 6px; border-radius: 4px; background: var(--pdfr-surface-2); }
.pdfr-gridhead { display: flex; align-items: center; gap: 8px; padding: 0 0 8px 4px; }
.pdfr-gridhead strong { font-size: 16px; font-weight: 600; }
.pdfr-gridhead span { flex: 1; font-size: 13px; color: var(--pdfr-muted); }
.pdfr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content; /* rows must not shrink below the thumbnail + label */
  gap: 14px 10px;
  padding: 4px 2px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pdfr .pdfr-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--pdfr-muted); font-variant-numeric: tabular-nums; }
.pdfr .pdfr-cell { width: 100%; }
.pdfr .pdfr-cell-box {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 8px;
  border-radius: 14px;
  background: var(--pdfr-stage);
  transition: box-shadow .2s ease;
}
.pdfr .pdfr-cell[aria-current="true"] .pdfr-cell-box { box-shadow: inset 0 0 0 2px var(--pdfr-ink); }
.pdfr .pdfr-cell[aria-current="true"] { color: var(--pdfr-text); font-weight: 600; }

/* ---------- full screen & embed fill ---------- */
.pdfr.is-fs { padding: 12px; background: var(--pdfr-fs-bg); }
.pdfr:fullscreen { width: 100%; height: 100%; }
.pdfr.is-pseudo { position: fixed; inset: 0; z-index: 2147483000; width: auto; height: auto; }
.pdfr.is-fs .pdfr-shell, .pdfr.is-fill .pdfr-shell { height: 100%; }
.pdfr.is-fs .pdfr-shell { box-shadow: none; }
.pdfr.is-fill { height: 100%; }
.pdfr.is-fs[data-layout="compact"] {
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.pdfr::backdrop { background: #0b0b0c; }
html.pdfr-lock, html.pdfr-lock body, .pdfr-lock { overflow: hidden !important; }

/* ---------- motion ---------- */
@keyframes pdfr-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes pdfr-spin { to { transform: rotate(360deg); } }
@keyframes pdfr-ring { to { stroke-dashoffset: 0; } }
@keyframes pdfr-pop { from { opacity: 0; transform: scale(.975); } }
@keyframes pdfr-fade { from { opacity: 0; } }
@keyframes pdfr-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pdfr-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .pdfr *, .pdfr *::before, .pdfr *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ---------- WordPress embed wrapper ---------- */
.pdfr-embed { container-type: inline-size; margin-block: 1.5em; }
.pdfr-embed > [data-pdf-reader] { max-width: none; }
/* Reserve roughly the final size before the script runs, so the article doesn't jump. */
[data-pdf-reader]:not(.pdfr) {
  display: block;
  aspect-ratio: 4 / 5;
  max-height: 78vh;
  border-radius: 26px;
  background: #f0f0ee;
}
@container (min-width: 900px) { [data-pdf-reader]:not(.pdfr) { aspect-ratio: 2.34 / 1; border-radius: 28px; } }
@media (prefers-color-scheme: dark) { [data-pdf-reader][data-theme="auto"]:not(.pdfr) { background: #18191b; } }
[data-pdf-reader][data-theme="dark"]:not(.pdfr) { background: #18191b; }

/* Shortcode width="wide" / "full": break out of a narrow content column (no transforms, so
   full screen keeps working). */
.pdfr-embed.pdfr-width-wide { max-width: none !important; width: auto !important; margin-left: calc(50% - min(640px, 50vw - 24px)) !important; margin-right: calc(50% - min(640px, 50vw - 24px)) !important; }
.pdfr-embed.pdfr-width-full { max-width: none !important; width: auto !important; margin-left: calc(50% - 50vw + 16px) !important; margin-right: calc(50% - 50vw + 16px) !important; }
.pdfr a.pdfr-btn:hover, .pdfr a.pdfr-btn:focus { text-decoration: none; }
.pdfr-notice { padding: 12px 16px; border-radius: 12px; background: #fff4e5; color: #6b4a00; font-size: 14px; }

/* 0.1.3: current-page cover and theme-safe interaction colors */
.pdfr .pdfr-cover .pdfr-chip { display: none !important; }
.pdfr .pdfr-cover::before { content: ""; position: absolute; inset: -24px; background-image: var(--pdfr-cover-image); background-size: cover; background-position: center; filter: blur(24px); opacity: .5; }
.pdfr .pdfr-cover::after { display: none; }
.pdfr .pdfr-cover img { inset: 18px auto auto 12%; width: 76%; height: auto; object-fit: contain; object-position: top; border-radius: 8px !important; box-shadow: 0 3px 12px rgba(0,0,0,.14) !important; }
.pdfr a, .pdfr button, .pdfr a:active, .pdfr button:active, .pdfr a:focus, .pdfr button:focus { -webkit-tap-highlight-color: transparent !important; }
@media (hover: none), (pointer: coarse) {
 .pdfr a, .pdfr button, .pdfr a:active, .pdfr button:active, .pdfr a:focus, .pdfr button:focus { outline: none !important; }
}
.pdfr button:hover, .pdfr button:focus, .pdfr button:active, .pdfr a:hover, .pdfr a:focus, .pdfr a:active { color: var(--pdfr-text) !important; background-color: transparent !important; border-color: transparent !important; }
.pdfr .pdfr-btn--ink:hover, .pdfr .pdfr-btn--ink:focus, .pdfr .pdfr-btn--ink:active, .pdfr .pdfr-round--ink:hover, .pdfr .pdfr-round--ink:focus, .pdfr .pdfr-round--ink:active, .pdfr .pdfr-notch:hover, .pdfr .pdfr-notch:focus, .pdfr .pdfr-notch:active { color: var(--pdfr-on-ink) !important; background-color: var(--pdfr-ink) !important; }
.pdfr .pdfr-cell, .pdfr .pdfr-cell:hover, .pdfr .pdfr-cell:focus, .pdfr .pdfr-cell[aria-current="true"] { background: transparent !important; color: var(--pdfr-muted) !important; }
.pdfr .pdfr-cell[aria-current="true"] .pdfr-cell-box { box-shadow: inset 0 0 0 1px var(--pdfr-muted) !important; }

/* 0.1.4 final polish */
.pdfr .pdfr-notch, .pdfr .pdfr-notch:hover, .pdfr .pdfr-notch:focus, .pdfr .pdfr-notch:active {
 background: transparent !important; color: var(--pdfr-text) !important; box-shadow: none !important;
}
.pdfr .pdfr-range::-webkit-slider-thumb { border-color: #b9bbc0; box-shadow: 0 1px 2px rgba(0,0,0,.10); }
.pdfr .pdfr-range::-moz-range-thumb { border-color: #b9bbc0; }

.pdfr .pdfr-tools .pdfr-fitw[hidden] { display: none !important; }
