/* Paid chapter content obfuscation (anti-copy)
   Notes:
   - This is NOT a true DRM solution; it mainly prevents simple copy/select and basic HTML-only crawlers.
   - Only applies when server renders `.hdk-obf-line` blocks. */

.hdk-obf-line {
  position: relative;
  white-space: pre-wrap;
}

.hdk-obf-line::before {
  content: attr(data-hdk-1);
}

.hdk-obf-line::after {
  content: attr(data-hdk-2);
}

/* Chapter content protection (CSS-only baseline)
   - Applies when the container has `.hdk-chapter-protect` (readable chapters: free + paid unlocked)
   - Keeps SEO intact because the text remains normal DOM text */
#chapter-content.hdk-chapter-protect,
#chapter-content.hdk-paid-chapter-protect {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Extra transparent overlay for mobile long-press selection */
@media (hover: none) and (pointer: coarse) {
  #chapter-content.hdk-chapter-protect,
  #chapter-content.hdk-paid-chapter-protect {
    position: relative;
  }

  #chapter-content.hdk-chapter-protect::after,
  #chapter-content.hdk-paid-chapter-protect::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: pan-y;
  }

  #chapter-content.hdk-chapter-protect > *,
  #chapter-content.hdk-paid-chapter-protect > * {
    position: relative;
    z-index: 1;
  }
}

