/* ==================== 11. 1:1 HD READER LIGHTBOX ==================== */
#reader {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#reader.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#readerStage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#readerStage.can-pan {
  cursor: grab;
}

#readerStage.panning {
  cursor: grabbing;
}

#readerImg {
  display: block;
  max-width: none;
  max-height: none;
  border-radius: 6px;
  background: #0d0f13;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
  image-rendering: auto;
  pointer-events: none;
  transform-origin: 50% 50%;
}

#readerBar {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  color: #f8fafc;
}

#readerBar button {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background-color 0.14s ease;
}

#readerBar button:hover {
  background: rgba(255, 255, 255, 0.12);
}

#readerBar button.on {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
}

#readerPct {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
  padding: 0 4px;
}

#readerCap {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-family: var(--hand);
  font-size: 22px;
  max-width: calc(100vw - 36px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
