
/* clamp-overflow.css — block horizontal scroll in viewing area */
html, body { overflow-x: hidden; }

.viewer-wrap, .viewer, #viewer {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

/* Common offenders */
#viewer img, .viewer img, .viewer-wrap img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

#viewer video, #viewer canvas, #viewer svg, #viewer iframe {
  max-width: 100% !important;
  width: 100% !important;
}

#viewer table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
  display: block;             /* Prevent overflow beyond container */
  overflow-x: auto;           /* If too wide, become scrollable inside #viewer only */
}

#viewer pre, #viewer code, #viewer .code, #viewer .math, #viewer .equation {
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

/* Long URLs/words */
#viewer, #viewer * {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
