.kx-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--color-canvas-bg);
  user-select: none;
  touch-action: none;
}
.kx-compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.kx-compare__after {
  position: absolute;
  inset: 0;
  will-change: clip-path;
}
.kx-compare__label {
  position: absolute;
  top: var(--space-3);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--color-on-accent);
  background: rgba(16, 24, 40, 0.72);
  pointer-events: none;
}
.kx-compare__label--before {
  left: var(--space-3);
}
.kx-compare__label--after {
  right: var(--space-3);
}
.kx-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  padding: 0;
  border: none;
  background: var(--color-white);
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.3);
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kx-compare__handle-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-primary-700);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  letter-spacing: -1px;
  box-shadow: var(--shadow-level2);
}
.kx-compare__handle:focus-visible {
  outline: none;
}
.kx-compare__handle:focus-visible .kx-compare__handle-grip {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 2px;
}
