/* v196: numbers and image share one coordinate system, without letterboxing. */
html[data-theme] .exam-paper .paper-image {
  display: block;
  width: 100%;
  max-width: none;
  margin: 24px auto;
  padding: 0;
  border: 0;
}

html[data-theme] .exam-paper .paper-image__stage {
  position: relative;
  display: block;
  width: min(100%, 620px);
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  line-height: 0;
  direction: ltr;
}

html[data-theme] .exam-paper .paper-image__stage > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  object-fit: contain;
}

html[data-theme] .exam-paper .paper-image__stage > .map-coordinate-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

html[data-theme] .exam-paper .paper-image__stage .map-coordinate-marker {
  position: absolute;
  width: max-content;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  font-size: clamp(13px, 1.5vw, 18px);
  line-height: 1;
}

@media print {
  html[data-theme] .exam-paper .paper-image__stage {
    /* A portrait question still fits a printed page; markers scale with it. */
    width: min(100%, 100mm);
    break-inside: avoid;
  }
}
