/*
 * Libra Reader – styles for libra-reader.js (loaded after viewer.css).
 * Everything is scoped under html.lr-active (set when the module attaches) so viewer.css keeps working alone.
 */

html {
  --lr-bg: #e9ebef;
  --lr-chrome-bg: rgba(255, 255, 255, 0.94);
  --lr-chrome-fg: #1f2328;
  --lr-chrome-muted: #5f6672;
  --lr-chrome-border: rgba(0, 0, 0, 0.08);
  --lr-accent: #1a73e8;
  --lr-accent-fg: #fff;
  --lr-tick: rgba(31, 35, 40, 0.28);
  --lr-tick-major: rgba(31, 35, 40, 0.72);
  --lr-bookmark: #e8710a;
  --lr-track: rgba(31, 35, 40, 0.14);
  --lr-rail-w: 54px;
  --lr-page-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 10px 28px rgba(0, 0, 0, 0.14);
  --lr-page-filter: none;
  --lr-panel-bg: #fff;
  --lr-radius: 14px;
  --lr-font: IRANSansX, Tahoma, "Segoe UI", sans-serif;
  --lr-turn-ms: 520ms;
}
html[data-lr-theme="sepia"] {
  --lr-bg: #e7dcc4;
  --lr-chrome-bg: rgba(250, 243, 226, 0.95);
  --lr-chrome-fg: #4a3a28;
  --lr-chrome-muted: #7a6650;
  --lr-chrome-border: rgba(74, 58, 40, 0.14);
  --lr-accent: #9a5b20;
  --lr-tick: rgba(74, 58, 40, 0.3);
  --lr-tick-major: rgba(74, 58, 40, 0.75);
  --lr-track: rgba(74, 58, 40, 0.16);
  --lr-page-filter: sepia(0.28) saturate(1.05) brightness(0.98);
  --lr-panel-bg: #fbf5e6;
}
html[data-lr-theme="dark"] {
  --lr-bg: #141518;
  --lr-chrome-bg: rgba(30, 31, 35, 0.94);
  --lr-chrome-fg: #e9e9ec;
  --lr-chrome-muted: #a5a8b0;
  --lr-chrome-border: rgba(255, 255, 255, 0.1);
  --lr-accent: #8ab4f8;
  --lr-accent-fg: #0b1a33;
  --lr-tick: rgba(233, 233, 236, 0.3);
  --lr-tick-major: rgba(233, 233, 236, 0.78);
  --lr-bookmark: #fbbc04;
  --lr-track: rgba(233, 233, 236, 0.18);
  --lr-page-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
  --lr-page-filter: brightness(0.86) contrast(1.04);
  --lr-panel-bg: #202125;
}

/* ---------------------------------------------------------------- layout */

html.lr-active body {
  background: var(--lr-bg);
  overflow: hidden;
}
html.lr-active #viewerContainer {
  position: absolute;
  inset: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  background: var(--lr-bg);
  transition: filter 0.2s ease;
  touch-action: pan-x pan-y pinch-zoom;
  overscroll-behavior: none;
}
/* Page mode at fit: one-finger swipes belong to us (native panning would fire pointercancel and swallow the swipe). */
html.lr-active.lr-page-mode:not(.lr-zoomed) #viewerContainer {
  touch-action: pinch-zoom;
}
/* A horizontal swipe must never trigger the browser's back/forward history gesture. */
html.lr-active,
html.lr-active body {
  overscroll-behavior: none;
}
html.lr-active .pdfViewer .page {
  box-shadow: var(--lr-page-shadow);
}
/* MJ 2026-10-06: pdf.js' 9px transparent page border sat INSIDE the page box (bootstrap's box-sizing: border-box), so the
   canvas wrapper was 18px smaller than the canvas and the right and bottom edge of every page were cut off. The app
   never passes removePageBorders to PDFViewer, so drop the border here (the page box is then exactly the canvas). */
html.lr-active .pdfViewer .page {
  border: 0 !important;
}
html.lr-active .pdfViewer .page canvas {
  filter: var(--lr-page-filter);
}
html.lr-active .pdfViewer .page,
html.lr-active .pdfViewer .page * {
  direction: ltr; /* page content keeps its own geometry even inside an RTL container */
}
/* page-by-page: full-height page, centered both ways (safe centering when zoomed) */
html.lr-active.lr-page-mode .pdfViewer {
  padding: 0 !important;
  min-height: 100%;
  display: flex;
}
html.lr-active.lr-page-mode .pdfViewer > .page,
html.lr-active.lr-page-mode .pdfViewer > .spread {
  margin: auto !important;
  flex: none;
}
html.lr-active.lr-page-mode .pdfViewer > .spread {
  display: flex;
  gap: 2px;
  white-space: nowrap;
}
html.lr-active.lr-page-mode .pdfViewer > .spread > .page {
  margin: 0 !important;
}
html.lr-active.lr-page-mode #viewerContainer {
  overflow: hidden;
}
html.lr-active.lr-page-mode.lr-zoomed #viewerContainer {
  overflow: auto;
}
html.lr-active #viewerContainer.lr-edge-cursor {
  cursor: pointer;
}
html.lr-active.lr-zoomed #viewerContainer {
  cursor: grab;
}
html.lr-active.lr-zoomed #viewerContainer.lr-panning {
  cursor: grabbing;
}
html.lr-active.lr-zoomed #viewerContainer .textLayer {
  pointer-events: none; /* pan instead of selecting while zoomed */
}
/* scroll mode keeps the original top padding under the (always visible) toolbar */
html.lr-active:not(.lr-page-mode) .pdfViewer {
  padding-bottom: 120px;
}
/* MJ 2026-10-06: page by page and horizontal scrolling: the page area sits BETWEEN the bars while they are shown, so
   "fit page" shows the whole page; Layout (libra-reader.js) measures the bars into these variables (0 when hidden) and
   re-fits the page. The defaults only cover the first paint before the script runs. Vertical scroll keeps the overlay. */
html.lr-active {
  --lr-area-top: 66px;
  --lr-area-bottom: 112px;
}
html.lr-active.lr-page-mode #viewerContainer,
html.lr-active.lr-hscroll #viewerContainer {
  top: var(--lr-area-top) !important;
  bottom: var(--lr-area-bottom) !important;
}
html.lr-active.lr-hscroll .pdfViewer {
  padding-bottom: 0;
}
/* desktop: the page area leaves room for the side toolbar so it never covers the page */
@media (min-width: 768px) {
  html.lr-active.lr-rail-left #viewerContainer { left: calc(var(--lr-rail-w) + 14px) !important; }
  html.lr-active.lr-rail-right #viewerContainer { right: calc(var(--lr-rail-w) + 14px) !important; }
}

/* ---------------------------------------------------------------- top toolbar (existing markup, restyled) */

html.lr-active .toolbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
html.lr-active #toolbarContainer {
  background-color: var(--lr-chrome-bg) !important;
  color: var(--lr-chrome-fg);
  border-bottom: 1px solid var(--lr-chrome-border);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  font-family: var(--lr-font);
}
html.lr-active #toolbarContainer i,
html.lr-active #toolbarContainer .toolbarLabel,
html.lr-active #title-container a {
  color: var(--lr-chrome-fg) !important;
}
html.lr-active #toolbarViewerRight > i,
html.lr-active #toolbarViewerRight > .font-container,
html.lr-active #toolbarViewerRight > .toolbarButton,
html.lr-active .lr-tool {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 0;
  color: var(--lr-chrome-fg);
  font-size: 16px;
  margin: 0 1px;
  transition: background 0.15s ease;
}
html.lr-active #toolbarViewerRight > i:hover,
html.lr-active #toolbarViewerRight > .font-container:hover,
html.lr-active .lr-tool:hover {
  background: color-mix(in srgb, var(--lr-chrome-fg) 9%, transparent);
}
html.lr-active #toolbarViewerRight > :is(.d-none, [hidden]) {
  display: none !important;
}
/* pdf.js' own print/save buttons stay hidden as in the original page (download is offered via #lr-download only when allowed). */
html.lr-active #toolbarViewerRight > :is(#print, #download) {
  display: none !important;
}
/* viewer.css spaces these with a 72px gap, which overflows into the page box (and off-screen on phones). */
html.lr-active #toolbarViewerRight {
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
html.lr-active #toolbarViewerRight > * {
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  html.lr-active #toolbarViewerRight {
    gap: 2px;
  }
}
html.lr-active :is(#toolbarViewerRight > i, .lr-tool, .lr-btn, .font-container):focus-visible {
  outline: 2px solid var(--lr-accent);
  outline-offset: 1px;
}
html.lr-active #pageNumber {
  border-radius: 8px;
  text-align: center;
  font-family: var(--lr-font);
}
/* MJ 2026-10-06: the top bar follows the SITE language, not the browser's: pdf.js sets <html dir> from the browser
   locale (navigator.language), so with an English browser the Persian bar was laid out left to right (back arrow and
   book title on the left). Persian UI: back arrow, logo and title start at the right; the page counter stays in the
   middle; the remaining tools go to the left. */
html.lr-active.lr-ui-rtl #toolbarViewer {
  direction: rtl;
  flex-direction: row !important;
}
html.lr-active.lr-ui-ltr #toolbarViewer {
  direction: ltr;
  flex-direction: row !important;
}
html.lr-active #toolbarViewerLeft {
  flex-direction: row !important;
  justify-content: flex-start !important;
}
html.lr-active.lr-ui-rtl #title-container a {
  direction: rtl;
  text-align: right;
}
html.lr-chrome-hidden .toolbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------- bottom bar (seekometer) */

#lr-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  padding: 6px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--lr-chrome-bg);
  color: var(--lr-chrome-fg);
  border-top: 1px solid var(--lr-chrome-border);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  font-family: var(--lr-font);
  transition: transform 0.28s ease, opacity 0.28s ease;
  direction: rtl;
}
html.lr-ltr #lr-bottom .lr-scrub-row {
  direction: ltr;
}
html.lr-rtl #lr-bottom .lr-scrub-row {
  direction: rtl;
}
html.lr-chrome-hidden #lr-bottom {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
#lr-bottom .lr-info {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 1100px;
  margin: 0 auto;
}
#lr-bottom .lr-chapter {
  color: var(--lr-chrome-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: start;
}
#lr-bottom .lr-pos {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
#lr-bottom .lr-extra {
  color: var(--lr-chrome-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: end;
}
#lr-bottom .lr-scrub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 1100px;
  margin: 2px auto 0;
}
.lr-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--lr-chrome-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.lr-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--lr-chrome-fg) 9%, transparent);
}
.lr-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.lr-btn.lr-active {
  color: var(--lr-accent);
  background: color-mix(in srgb, var(--lr-accent) 14%, transparent);
}
html.lr-rtl .lr-first i,
html.lr-rtl .lr-last i {
  transform: scaleX(-1);
}
.lr-scrub {
  position: relative;
  flex: 1;
  height: 50px;
  min-width: 80px;
}
.lr-ruler {
  position: absolute;
  inset: 0 0 auto 0;
  pointer-events: none;
}
.lr-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: none;
}
.lr-range:focus {
  outline: none;
}
.lr-range::-webkit-slider-runnable-track {
  height: 50px;
  background: transparent;
}
.lr-range::-moz-range-track {
  height: 50px;
  background: transparent;
}
/* the thumb is centred on the drawn track (Scrubber.MID = 23px): margin-top = 23 - 22 / 2 */
.lr-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: 12px;
  border-radius: 50%;
  background: var(--lr-accent);
  border: 3px solid var(--lr-chrome-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease;
}
.lr-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lr-accent);
  border: 3px solid var(--lr-chrome-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.lr-range:active::-webkit-slider-thumb,
.lr-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.25);
}
.lr-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lr-accent) 35%, transparent);
}

/* preview bubble while dragging */
.lr-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: clamp(70px, var(--x, 50%), calc(100% - 70px));
  transform: translate(-50%, 6px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  background: var(--lr-panel-bg);
  color: var(--lr-chrome-fg);
  border: 1px solid var(--lr-chrome-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  padding: 8px 10px;
  text-align: center;
  min-width: 120px;
  max-width: 220px;
  transition: opacity 0.12s ease, transform 0.12s ease;
  direction: rtl;
}
.lr-bubble.lr-show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.lr-bubble-img {
  width: 96px;
  margin: 0 auto 6px;
  min-height: 0;
}
.lr-bubble-img img {
  display: block;
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.lr-bubble-img.lr-empty {
  display: none;
}
.lr-bubble-page {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.lr-bubble-chapter {
  font-size: 12.5px;
  color: var(--lr-chrome-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lr-bubble-chapter:empty {
  display: none;
}
.lr-bubble-mark {
  display: none;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lr-bookmark);
}
.lr-bubble.lr-has-mark .lr-bubble-mark {
  display: block;
}

/* thumbnail strip */
.lr-strip-wrap {
  max-width: 1100px;
  margin: 2px auto 6px;
}
.lr-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.lr-thumb {
  flex: none;
  width: 64px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: center;
  color: var(--lr-chrome-muted);
  font-family: var(--lr-font);
}
.lr-thumb-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / var(--lr-aspect, 1.414);
  background: color-mix(in srgb, var(--lr-chrome-fg) 7%, transparent);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lr-thumb-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--lr-page-filter);
  animation: lr-fade-in 0.25s ease;
}
.lr-thumb-num {
  display: block;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}
.lr-thumb:hover .lr-thumb-img {
  transform: translateY(-2px);
}
.lr-thumb.lr-current .lr-thumb-img {
  box-shadow: 0 0 0 2px var(--lr-accent), 0 4px 10px rgba(0, 0, 0, 0.25);
}
.lr-thumb.lr-current .lr-thumb-num {
  color: var(--lr-accent);
  font-weight: 700;
}
.lr-thumb:focus-visible {
  outline: 2px solid var(--lr-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* "Pages" tab grid (bookmark modal) */
#sidebarContainer #sidebarContent,
#sidebarContainer #sidebarResizer {
  display: none !important;
}
.lr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 14px 12px;
  padding: 8px 4px;
}
.lr-grid .lr-thumb {
  width: 100%;
}
@keyframes lr-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------------------------------------------------------- edge hints, zoom bar, back pill, toast */

.lr-edge {
  position: fixed;
  top: 50%;
  z-index: 20;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lr-chrome-bg);
  color: var(--lr-chrome-fg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.lr-edge-left { left: 14px; }
.lr-edge-right { right: 14px; }
html.lr-rail-left .lr-edge-left { left: calc(var(--lr-rail-w) + 26px); }
html.lr-rail-right .lr-edge-right { right: calc(var(--lr-rail-w) + 26px); }
.lr-edge.lr-show {
  opacity: 0.85;
  transform: scale(1);
}
@media (pointer: coarse) {
  .lr-edge { display: none; }
}

/* side toolbar (rail): zoom + reader tools */
.lr-rail {
  --lr-rail-btn: 40px;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  max-height: calc(100vh - 200px);
  max-height: calc(100dvh - 200px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  background: var(--lr-chrome-bg);
  color: var(--lr-chrome-fg);
  border: 1px solid var(--lr-chrome-border);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  font-family: var(--lr-font);
  direction: ltr;
  transition: opacity 0.28s ease, max-height 0.28s ease;
}
.lr-rail::-webkit-scrollbar {
  display: none;
}
html.lr-active .lr-rail.lr-rail-compact {
  --lr-rail-btn: 34px;
  gap: 3px;
  padding: 4px;
}
html.lr-active .lr-rail.lr-rail-compact .lr-rail-group {
  gap: 0;
}
html.lr-rail-left .lr-rail { left: 10px; }
html.lr-rail-right .lr-rail { right: 10px; }
/* bars hidden: the rail stays (zoom is always one click away) but steps back until hovered */
html.lr-chrome-hidden .lr-rail {
  opacity: 0.35;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
}
html.lr-chrome-hidden .lr-rail:hover,
html.lr-chrome-hidden .lr-rail:focus-within {
  opacity: 1;
}
html.lr-active .lr-rail .lr-rail-btn.lr-rail-toggle {
  display: none !important; /* phones only */
}
.lr-rail-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lr-rail-sep {
  flex: none;
  width: 26px;
  height: 1px;
  margin: 1px 0;
  background: var(--lr-chrome-border);
}
html.lr-active .lr-rail .lr-rail-btn {
  position: relative;
  flex: none;
  width: var(--lr-rail-btn);
  height: var(--lr-rail-btn);
  min-width: 0;
  margin: 0 !important;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--lr-chrome-fg) !important;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
html.lr-active .lr-rail .lr-rail-btn:is(.d-none, [hidden], [style*="display: none"]) {
  display: none !important;
}
html.lr-active .lr-rail .lr-rail-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--lr-chrome-fg) 9%, transparent);
}
html.lr-active .lr-rail .lr-rail-btn:disabled {
  opacity: 0.32;
  cursor: default;
}
html.lr-active .lr-rail .lr-rail-btn:is(.toggled, [aria-expanded="true"], .lr-active) {
  color: var(--lr-accent) !important;
  background: color-mix(in srgb, var(--lr-accent) 14%, transparent);
}
html.lr-active .lr-rail #remove-bookmark-btn {
  color: var(--lr-bookmark) !important;
}
html.lr-active .lr-rail .lr-rail-btn:focus-visible,
html.lr-active .lr-rail .lr-zoom-pct:focus-visible {
  outline: 2px solid var(--lr-accent);
  outline-offset: 1px;
}
/* pdf.js toolbar buttons draw their icon with ::before masks and hide their label text */
html.lr-active .lr-rail .toolbarButton::before {
  display: none !important;
}
html.lr-active .lr-rail .lr-rail-btn > span {
  display: none !important;
}
html.lr-active .lr-rail .lr-rail-btn > i {
  font-size: 16px;
  color: inherit !important;
  pointer-events: none;
}
.lr-zoom-pct {
  flex: none;
  width: var(--lr-rail-btn);
  padding: 2px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--lr-chrome-fg);
  font-family: var(--lr-font);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.lr-zoom-pct:hover {
  background: color-mix(in srgb, var(--lr-chrome-fg) 9%, transparent);
}
.lr-tip {
  position: fixed;
  z-index: 10005;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(32, 33, 36, 0.94);
  color: #fff;
  font-family: var(--lr-font);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  direction: rtl;
}
html[dir="ltr"] .lr-tip {
  direction: ltr;
}
.lr-tip.lr-show {
  opacity: 1;
}

.lr-back {
  position: fixed;
  bottom: 124px;
  inset-inline-start: 16px;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: var(--lr-accent);
  color: var(--lr-accent-fg);
  font-family: var(--lr-font);
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, bottom 0.28s ease;
}
html[dir="ltr"] .lr-back {
  left: auto;
  right: 16px;
  direction: rtl;
}
.lr-back.lr-show {
  opacity: 1;
  transform: none;
}
html.lr-chrome-hidden .lr-back {
  bottom: 24px;
}

.lr-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 10003;
  max-width: min(92vw, 520px);
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(32, 33, 36, 0.94);
  color: #fff;
  font-family: var(--lr-font);
  font-size: 13.5px;
  text-align: center;
  direction: rtl;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lr-toast.lr-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* end-of-book nudge */
#viewerContainer.lr-bump-end .pdfViewer { animation: lr-bump 0.32s ease; }
#viewerContainer.lr-bump-start .pdfViewer { animation: lr-bump 0.32s ease reverse; }
@keyframes lr-bump {
  0%, 100% { transform: none; }
  35% { transform: translateX(-10px); }
  70% { transform: translateX(5px); }
}

/* ---------------------------------------------------------------- page-turn animation */

.lr-flip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  filter: var(--lr-page-filter); /* same paper tone as the pages under it */
}
@media (prefers-reduced-motion: reduce) {
  html.lr-active .lr-pop { animation: none; }
  #viewerContainer.lr-bump-end .pdfViewer,
  #viewerContainer.lr-bump-start .pdfViewer { animation: none; }
}

/* ---------------------------------------------------------------- panels */

.lr-panel {
  position: fixed;
  top: 66px;
  inset-inline-end: 16px;
  z-index: 10002;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 190px);
  overflow: auto;
  background: var(--lr-panel-bg);
  color: var(--lr-chrome-fg);
  border: 1px solid var(--lr-chrome-border);
  border-radius: var(--lr-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: var(--lr-font);
  direction: rtl;
  text-align: start;
  animation: lr-pop 0.16s ease;
}
html[dir="ltr"] .lr-panel {
  right: auto;
  left: 16px;
}
/* panels, the find bar and pdf.js' "more" menu open beside the side toolbar */
@media (min-width: 768px) {
  html.lr-rail-left .lr-panel:not(.lr-panel-help) { left: calc(var(--lr-rail-w) + 22px) !important; right: auto !important; }
  html.lr-rail-right .lr-panel:not(.lr-panel-help) { right: calc(var(--lr-rail-w) + 22px) !important; left: auto !important; }
}
html.lr-active #findbar,
html.lr-active #secondaryToolbar {
  position: fixed !important;
  inset: auto !important;
  top: 70px !important;
  z-index: 10002 !important;
  margin: 0 !important;
  border: 1px solid var(--lr-chrome-border) !important;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}
html.lr-rail-left #findbar,
html.lr-rail-left #secondaryToolbar { left: calc(var(--lr-rail-w) + 22px) !important; }
html.lr-rail-right #findbar,
html.lr-rail-right #secondaryToolbar { right: calc(var(--lr-rail-w) + 22px) !important; }
html.lr-active #findbar.doorHanger::before,
html.lr-active #findbar.doorHanger::after,
html.lr-active #secondaryToolbar::before,
html.lr-active #secondaryToolbar::after {
  display: none !important;
}
/* layouts belong to our settings panel (they honour the admin switches and protected books) */
html.lr-active :is(#scrollModeButtons, #spreadModeButtons, #scrollModeButtons + .horizontalToolbarSeparator, #spreadModeButtons + .horizontalToolbarSeparator) {
  display: none !important;
}
.lr-panel-help {
  inset-inline-end: auto;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  animation: none;
}
@keyframes lr-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
/* popovers opened from the side toolbar: placed by Pop.place() beside the rail, centred on their button */
html.lr-active .lr-pop {
  position: fixed !important;
  margin: 0 !important;
  max-width: var(--lr-pop-maxw, calc(100vw - 16px)) !important;
  overflow: visible !important;
  animation: lr-pop-in 0.16s ease;
}
html.lr-ui-ltr :is(.lr-panel, .lr-tip, #documentPropertiesDialog) {
  direction: ltr;
}
html.lr-rail-left .lr-pop { --lr-pop-dx: -6px; }
html.lr-rail-right .lr-pop { --lr-pop-dx: 6px; }
@keyframes lr-pop-in {
  from { opacity: 0; translate: var(--lr-pop-dx, 0) 0; }
  to { opacity: 1; translate: 0 0; }
}
html.lr-active .lr-panel.lr-pop {
  display: flex;
  flex-direction: column;
  width: min(360px, var(--lr-pop-maxw, 360px));
}
html.lr-active .lr-panel-help.lr-pop {
  width: min(520px, var(--lr-pop-maxw, 520px));
}
html.lr-active .lr-panel.lr-pop .lr-panel-head {
  flex: none;
}
html.lr-active .lr-panel.lr-pop .lr-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.lr-pop-arrow {
  position: absolute;
  top: var(--lr-arrow-y, 50%);
  z-index: 1;
  width: 12px;
  height: 12px;
  background: inherit;
  border: 1px solid var(--lr-chrome-border);
  pointer-events: none;
}
html.lr-rail-left .lr-pop-arrow {
  left: -7px;
  border-top-color: transparent;
  border-right-color: transparent;
  transform: translateY(-50%) rotate(45deg);
}
html.lr-rail-right .lr-pop-arrow {
  right: -7px;
  border-bottom-color: transparent;
  border-left-color: transparent;
  transform: translateY(-50%) rotate(45deg);
}
/* pdf.js' "more" menu is gone: its items live in the rail (rotate, hand tool, document properties) */
html.lr-active #secondaryToolbarToggle,
html.lr-active #secondaryToolbar {
  display: none !important;
}
/* pdf.js' document-properties dialog in the reader's look */
html.lr-active #documentPropertiesDialog {
  width: min(420px, var(--lr-pop-maxw, 420px));
  box-sizing: border-box;
  padding: 16px 18px;
  font-family: var(--lr-font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--lr-chrome-fg);
  background: var(--lr-panel-bg);
  border: 1px solid var(--lr-chrome-border);
  border-radius: var(--lr-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
html.lr-active #documentPropertiesDialog::backdrop {
  background: rgba(0, 0, 0, 0.18);
}
.lr-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
}
.lr-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.lr-panel-close {
  border: 0;
  background: transparent;
  color: var(--lr-chrome-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}
.lr-panel-close:hover {
  background: color-mix(in srgb, var(--lr-chrome-fg) 9%, transparent);
}
.lr-panel-body {
  padding: 6px 16px 16px;
}
.lr-field {
  margin: 10px 0 14px;
}
.lr-label {
  font-size: 12.5px;
  color: var(--lr-chrome-muted);
  margin-bottom: 6px;
}
.lr-seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--lr-chrome-fg) 7%, transparent);
}
.lr-seg button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  padding: 8px 6px;
  background: transparent;
  color: var(--lr-chrome-fg);
  font-family: var(--lr-font);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.lr-seg button[aria-checked="true"] {
  background: var(--lr-panel-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  color: var(--lr-accent);
  font-weight: 700;
}
.lr-seg-theme button[data-value="light"] i { color: #f2a600; }
.lr-seg-theme button[data-value="sepia"] i { color: #9a5b20; }
.lr-seg-theme button[data-value="dark"] i { color: #6b7cff; }
.lr-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 13.5px;
  margin: 0;
  position: relative;
}
.lr-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.lr-switch-ui {
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lr-chrome-fg) 22%, transparent);
  position: relative;
  transition: background 0.18s ease;
}
.lr-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: inset-inline-start 0.18s ease;
}
.lr-switch input:checked + .lr-switch-ui {
  background: var(--lr-accent);
}
.lr-switch input:checked + .lr-switch-ui::after {
  inset-inline-start: 21px;
}
.lr-switch input:focus-visible + .lr-switch-ui {
  outline: 2px solid var(--lr-accent);
  outline-offset: 2px;
}
/* MJ 2026-10-06: "document properties" popover (book catalogue data + file facts) */
html.lr-active .lr-panel-docprops.lr-pop {
  width: min(440px, var(--lr-pop-maxw, 440px));
}
.lr-props-h {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lr-accent);
}
.lr-props-h:first-child {
  margin-top: 4px;
}
.lr-props {
  display: grid;
  grid-template-columns: minmax(84px, max-content) 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}
.lr-props dt {
  font-weight: 400;
  color: var(--lr-chrome-muted);
  white-space: nowrap;
}
.lr-props dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: start;
}
.lr-props-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.lr-props-close {
  border: 1px solid var(--lr-chrome-border);
  background: transparent;
  color: var(--lr-chrome-fg);
  font-family: var(--lr-font);
  font-size: 13px;
  padding: 6px 22px;
  border-radius: 9px;
  cursor: pointer;
}
.lr-props-close:hover,
.lr-props-close:focus-visible {
  background: color-mix(in srgb, var(--lr-chrome-fg) 9%, transparent);
}
.lr-note {
  font-size: 12.5px;
  color: var(--lr-chrome-muted);
  margin: 8px 0;
  line-height: 1.9;
}
.lr-linkbtn {
  border: 0;
  background: transparent;
  color: var(--lr-accent);
  font-family: var(--lr-font);
  font-size: 13px;
  padding: 6px 0;
  cursor: pointer;
}
@media (max-width: 899px) {
  .lr-wide-only { display: none !important; }
}
.lr-keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 0;
  font-size: 13px;
  align-items: center;
}
.lr-keys dt {
  white-space: nowrap;
  font-weight: 400;
  direction: ltr;
  text-align: end;
}
.lr-keys dd {
  margin: 0;
  color: var(--lr-chrome-muted);
}
.lr-keys kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--lr-chrome-border);
  border-bottom-width: 2px;
  background: color-mix(in srgb, var(--lr-chrome-fg) 5%, transparent);
  color: var(--lr-chrome-fg);
  font-family: var(--lr-font);
  font-size: 12px;
  text-align: center;
}

/* ---------------------------------------------------------------- table of contents (bookmark modal "contents" tab) */

.lr-toc,
.lr-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lr-toc-item {
  position: relative;
}
.lr-toc-item.lr-collapsed > .lr-toc-children {
  display: none;
}
.lr-toc-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  font-family: var(--lr-font);
  font-size: 13.5px;
  line-height: 1.8;
  padding: 6px 10px;
  padding-inline-start: calc(28px + var(--lr-depth, 0) * 16px);
  border-radius: 8px;
  cursor: pointer;
}
.lr-toc-link:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.lr-toc-title {
  flex: 1;
}
.lr-toc-page {
  flex: none;
  font-size: 12px;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}
.lr-toc-link.lr-current {
  background: color-mix(in srgb, var(--lr-accent) 14%, transparent);
  color: var(--lr-accent);
  font-weight: 700;
}
.lr-toc-toggle {
  position: absolute;
  top: 6px;
  inset-inline-start: calc(var(--lr-depth-t, 0px));
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.15s ease;
}
.lr-toc-children .lr-toc-toggle { inset-inline-start: 16px; }
.lr-toc-children .lr-toc-children .lr-toc-toggle { inset-inline-start: 32px; }
.lr-toc-children .lr-toc-children .lr-toc-children .lr-toc-toggle { inset-inline-start: 48px; }
.lr-toc-toggle[aria-expanded="false"] {
  transform: rotate(90deg);
}
html[dir="ltr"] .lr-toc[dir="rtl"] .lr-toc-toggle[aria-expanded="false"] {
  transform: rotate(90deg);
}
.lr-empty {
  text-align: center;
  opacity: 0.7;
  padding: 24px 0;
}

/* ---------------------------------------------------------------- protected (page-only) mode */

html.lr-protected .pdfViewer,
html.lr-protected .pdfViewer *,
html.lr-protected .textLayer,
html.lr-protected .textLayer * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
html.lr-protected .textLayer ::selection {
  background: transparent !important;
}
html.lr-protected .pdfViewer .page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: var(--lr-wm, none);
  background-repeat: repeat;
  opacity: 0.075;
}
html.lr-protected[data-lr-theme="dark"] .pdfViewer .page::before {
  opacity: 0.11;
}
html.lr-protected :is(#scrollVertical, #scrollHorizontal, #scrollWrapped, #scrollModeButtons, #cursorSelectTool, #print, #download, #secondaryPrint, #secondaryDownload) {
  display: none !important;
}
.lr-shield {
  display: none;
}
html.lr-protected.lr-blurred #viewerContainer,
html.lr-protected.lr-blurred .lr-strip,
html.lr-protected.lr-blurred .lr-bubble,
html.lr-protected.lr-blurred .lr-flip {
  filter: blur(24px) saturate(0.6);
}
html.lr-protected.lr-blurred .lr-shield {
  position: fixed;
  inset: 0;
  z-index: 10004;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--lr-bg) 35%, transparent);
  color: var(--lr-chrome-fg);
  font-family: var(--lr-font);
  text-align: center;
  cursor: pointer;
}
.lr-shield i {
  font-size: 28px;
  opacity: 0.7;
}
.lr-shield p {
  margin: 10px 0 0;
  font-size: 14px;
}
@media print {
  html.lr-protected body,
  html.lr-protected #printContainer {
    display: none !important;
    visibility: hidden !important;
  }
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 767px) {
  #lr-bottom {
    padding: 4px 8px calc(6px + env(safe-area-inset-bottom));
  }
  #lr-bottom .lr-info {
    grid-template-columns: 1fr auto;
    gap: 8px;
    font-size: 12.5px;
  }
  #lr-bottom .lr-chapter {
    display: none;
  }
  #lr-bottom .lr-pos {
    text-align: start;
    font-size: 14px;
  }
  .lr-btn {
    width: 36px;
    height: 36px;
  }
  .lr-panel:not(.lr-pop) {
    top: auto;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    max-height: 78vh;
    border-radius: 18px 18px 0 0;
    transform: none !important;
    padding-bottom: env(safe-area-inset-bottom);
    animation: lr-sheet 0.2s ease;
  }
  .lr-back {
    bottom: 112px;
  }
  .lr-toast {
    top: 64px;
  }
  html.lr-active #toolbarContainer {
    padding: 0.35rem 0.6rem !important;
    min-height: 50px;
  }
  html.lr-active #title-container {
    margin: 0 6px !important;
  }
  html.lr-active #title-container a {
    margin: 0 !important;
    max-width: 30vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block !important;
  }
  html.lr-active #toolbarViewerMiddle {
    display: none !important;
  }
  html.lr-active #title-container a {
    max-width: 52vw;
  }
  html.lr-active #toolbarViewerMiddle {
    display: flex !important;
  }
  /* phones: compact side toolbar just under the top bar (the middle of the page edges stays free for turning);
     the tools fold behind one button; with the bars hidden only a faded zoom group stays */
  html.lr-active .lr-rail {
    --lr-rail-btn: 36px;
    top: 62px;
    transform: none;
    max-height: calc(100vh - 62px - 112px);
    max-height: calc(100dvh - 62px - 112px);
    padding: 4px;
    gap: 4px;
    border-radius: 14px;
  }
  html.lr-chrome-hidden .lr-rail {
    top: 12px;
  }
  html.lr-active .lr-rail.lr-rail-compact {
    --lr-rail-btn: 32px;
  }
  html.lr-active .lr-rail .lr-rail-btn.lr-rail-toggle {
    display: inline-flex !important;
  }
  html.lr-active .lr-rail:not(.lr-rail-open) .lr-rail-tools {
    display: none !important;
  }
  html.lr-rail-left .lr-rail { left: 6px; }
  html.lr-rail-right .lr-rail { right: 6px; }
  html.lr-chrome-hidden .lr-rail .lr-rail-tools,
  html.lr-chrome-hidden .lr-rail .lr-rail-btn.lr-rail-toggle,
  html.lr-chrome-hidden .lr-rail > .lr-rail-sep,
  html.lr-chrome-hidden .lr-rail .lr-zoom-pct {
    display: none !important;
  }
  html.lr-chrome-hidden .lr-rail {
    opacity: 0.6;
  }
  .lr-tip {
    display: none;
  }
}
@keyframes lr-sheet {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------------------------------------------------------------- site-wide feature switches (admin) */

html.lr-no-search #viewFind,
html.lr-no-fullscreen #btn-full-screen,
html.lr-no-bookmarks :is(#add-bookmark-btn, #remove-bookmark-btn, .lr-bm-list),
html.lr-no-contents #bookmark-list-btn,
html.lr-no-thumbnails :is(.lr-strip-btn, .lr-strip-wrap, .lr-bubble-img),
#bookmark-modal2 .lr-off {
  display: none !important;
}

/* ------------------------------------------------------------------ B11 layer 1: per-user overlay watermark
   Same look as the player's generic watermark (.lp-wm in Assets/player/libra-player.css: nowrap, soft shadow,
   eased move, RTL, Vazirmatn), dark ink for paper pages. Faint (0.12-0.18), never catches the pointer. */
@font-face {
  font-family: "Vazirmatn";
  src: url("../../player/fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../../player/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
.pdfViewer .page > .lr-wm-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: calc(var(--scale-factor, 1) * 150px);
  align-items: center;
  justify-items: center;
  opacity: var(--lr-wm-op, 0.14); /* admin: PdfWatermarkOpacityPercent */
  -webkit-user-select: none;
  user-select: none;
}
.lr-wm-t,
.lr-wm-float {
  font-family: "Vazirmatn", IRANSansX, Tahoma, "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  white-space: nowrap;
  color: #111;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.7);
  unicode-bidi: isolate;
  pointer-events: none;
}
.lr-wm-t {
  font-size: max(8px, calc(var(--scale-factor, 1) * 13px));
  transform: rotate(-30deg);
}
.lr-wm-t:nth-child(4n + 3),
.lr-wm-t:nth-child(4n + 4) {
  translate: 25% 0;
}
.lr-wm-float {
  position: absolute;
  z-index: 9000;
  padding: 2px 8px;
  font-size: clamp(11px, 1.6vw, 15px);
  opacity: calc(var(--lr-wm-op, 0.14) + 0.02);
  color: #fff;
  text-shadow: none;
  mix-blend-mode: difference; /* readable on paper and on the dark reader background */
  transition: left 1.2s ease, top 1.2s ease;
}
.lr-wm-t bdi,
.lr-wm-float bdi {
  unicode-bidi: isolate;
}
/* the page rule above forces every child of .page to ltr; Persian watermark text keeps its own direction */
html.lr-active .pdfViewer .page .lr-wm-t[dir="rtl"],
html.lr-active .pdfViewer .page .lr-wm-t[dir="rtl"] bdi {
  direction: rtl;
}
@media (prefers-reduced-motion: reduce) {
  .lr-wm-float { transition: none; }
}

/* Round 2 (B1): back arrow at the start of the top bar (same rule as the players: local returnUrl / same-site Referer / product page) */
.lr-backlink {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-inline-end: 4px;
  border-radius: 10px;
  color: var(--lr-chrome-fg, #1f2329) !important;
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.lr-backlink:hover,
.lr-backlink:focus-visible {
  background: var(--lr-chrome-hover, rgba(127, 127, 127, 0.16));
  outline: none;
}
.lr-backlink:focus-visible {
  box-shadow: 0 0 0 2px var(--lr-accent, #1a73e8);
}
