/* 전후 비교 부품의 작동에 필요한 최소 규칙. 색·크기·배치는 각 시안이 정한다. */
.ba-stage { position: relative; }
.ba-slide, .ba-side-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ba-ratio, 1 / 1);
  background: var(--frame);
  margin: 0;
}
.ba-slide { --pos: 50%; user-select: none; touch-action: pan-y; }
.ba-slide img, .ba-side-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
  z-index: 3;
}
.ba-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.ba-handle span::before, .ba-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  border: 6px solid transparent;
  transform: translateY(-50%);
}
.ba-handle span::before { left: 8px; border-right-color: #333; }
.ba-handle span::after { right: 8px; border-left-color: #333; }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
}
.ba-slide:has(.ba-range:focus-visible) { outline: 3px solid #f5c518; outline-offset: 3px; }
.ba-tag {
  position: absolute;
  top: 12px;
  z-index: 4;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.ba-tag-before, .ba-side-item:first-child .ba-tag { left: 12px; }
.ba-tag-after, .ba-side-item:last-child .ba-tag { left: 12px; }
.ba-tag-after { left: auto; right: 12px; }
.ba-side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ba-gap, 8px); }
.ba-side .ph-side { position: absolute; left: 12px; bottom: 12px; z-index: 5; margin: 0; max-width: calc(100% - 24px); }
.ba-stage [hidden] { display: none !important; }
.ba-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ba-cases, .ba-views { display: flex; flex-wrap: wrap; gap: 6px; }
.ba-case, .ba-view { font: inherit; cursor: pointer; }
.ba-record dl { margin: 0; }
.ba-record dd { margin: 0; }
.ba-record .ph-value { margin-top: 10px; }
.ba-notice { list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.ba-notice li { position: relative; padding-left: 1.2em; }
.ba-notice li + li { margin-top: 6px; }
.ba-notice li::before { content: "※"; position: absolute; left: 0; }

/* 사례 목록 기본: 각 시안이 배치(줄, 격자, 가로 넘김)를 정한다 */
.ba-thumbs { display: grid; gap: var(--ba-thumb-gap, 10px); }
.ba-thumb, .ba-more { font: inherit; color: inherit; text-align: left; cursor: pointer; border: 0; padding: 0; background: none; text-decoration: none; }
.ba-thumb-pic { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 3 / 1; overflow: hidden; border-radius: var(--ba-thumb-radius, 8px); background: var(--frame); }
.ba-thumb-pic img { width: 100%; height: 100%; object-fit: cover; }
.ba-thumb-cap { display: grid; margin-top: 8px; line-height: 1.35; }
.ba-thumb-cap b { font-weight: 700; }
.ba-thumb-cap span { font-size: 0.85rem; opacity: 0.72; }
.ba-thumb[aria-current="true"] .ba-thumb-pic { outline: 3px solid currentColor; outline-offset: 2px; }
.ba-more { display: grid; align-content: center; gap: 4px; padding: 18px; border-radius: var(--ba-thumb-radius, 8px); border: 1.5px dashed currentColor; min-height: 120px; }
.ba-more span { font-size: 0.85rem; opacity: 0.72; }
