/* Each full-size image uses the same frame; moving the divider only clips it. */
.article-body > figure.photo-compare,
.article-reader__page > figure.photo-compare {
  display: block;
  width: 100%;
  margin: 10px 0;
  break-inside: avoid;
}
.photo-compare__stage {
  position: relative;
  width: 100%;
  max-width: calc(var(--photo-compare-max-height, 100000px) * var(--photo-compare-ratio, 1.5));
  aspect-ratio: var(--photo-compare-ratio, 1.5);
  margin-inline: auto;
  overflow: hidden;
  isolation: isolate;
  background: #111;
  border-radius: 4px;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.photo-compare__stage:focus-within { outline: 2px solid #D9AB2A; outline-offset: 2px; }
.photo-compare__layer { position: absolute; inset: 0; }
.photo-compare__layer--left { clip-path: inset(0 calc(100% - var(--photo-compare-position, 50%)) 0 0); }
.article-body figure.photo-compare img.photo-compare__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover;
  object-position: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  cursor: ew-resize;
  pointer-events: none;
  -webkit-user-drag: none;
}
.photo-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--photo-compare-position, 50%);
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 3px #0009;
  pointer-events: none;
}
.photo-compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #D9AB2A;
  border-radius: 50%;
  background: #080808cc;
  color: #D9AB2A;
  font: 700 24px/1 sans-serif;
}
.photo-compare__label {
  position: absolute;
  bottom: 10px;
  max-width: calc(50% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 3px;
  background: #000b;
  color: #EFE3D2;
  font: 800 clamp(10px, 1.5vw, 13px)/1.2 "Archivo", "Pretendard", sans-serif;
  pointer-events: none;
}
.photo-compare__label--left { left: 10px; }
.photo-compare__label--right { right: 10px; }
.photo-compare__range {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
@media print { .photo-compare__handle, .photo-compare__range { display: none; } }
