/* bk-part_compare — 전후 비교: 이미지 두 장을 한 칸에 포개고 「후」(둘째)를 손잡이 오른쪽만 보이게 자른다 · 위치 --pos(설정 「처음 위치」 · 밀면 widget_ba.js 가 바꿈) */
.bk-part_compare{position:relative;--pos:50%;--cp-line-c:var(--color-white,Canvas);--cp-line-w:2px;box-sizing:border-box;overflow:hidden;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.bk-part_compare[data-bk-ba]{cursor:ew-resize}
.bk-part_compare-stage{display:grid;grid-template-columns:minmax(0,1fr)}
.bk-part_compare-stage>*{grid-area:1/1;min-width:0}
.bk-part_compare-stage>:nth-child(2){position:relative;z-index:1;clip-path:inset(0 0 0 var(--pos))}
.bk-part_compare-stage>:nth-child(n+3){display:none}
.bk-part_compare[data-bk-ba] .bk-part_compare-stage img{pointer-events:none;-webkit-user-drag:none}
/* 세로선 · 손잡이 — 무대 위 · 누름은 상자가 받는다 */
.bk-part_compare-bar{position:absolute;top:0;bottom:0;left:var(--pos);z-index:2;width:var(--cp-line-w);transform:translateX(-50%);background:var(--cp-line-c);pointer-events:none}
.bk-part_compare-knob{position:absolute;top:50%;left:50%;display:flex;align-items:center;justify-content:center;width:var(--cp-knob,44px);height:var(--cp-knob,44px);border-radius:50%;background:var(--color-white,Canvas);color:var(--color-black,CanvasText);box-shadow:0 2px 10px color-mix(in srgb,CanvasText 22%,transparent);transform:translate(-50%,-50%);font-style:normal;box-sizing:border-box}
.bk-part_compare-knob::before{content:"";width:16px;height:10px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M5 1L1 5l4 4M11 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M5 1L1 5l4 4M11 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
/* 전후 표시 — 아래 두 귀퉁이 */
.bk-part_compare-tag{position:absolute;top:var(--cp-tag-t,auto);bottom:var(--cp-tag-b,var(--cp-tag-gap,16px));z-index:3;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--color-black,CanvasText) 72%,transparent);color:var(--color-white,Canvas);font-size:12px;font-weight:700;letter-spacing:.08em;line-height:1.3;pointer-events:none}
.bk-part_compare-tag.is-b{left:var(--cp-tag-gap,16px)}
.bk-part_compare-tag.is-a{right:var(--cp-tag-gap,16px)}
/* 키보드용 범위 입력칸 — 보이지 않게 덮고 · 초점이면 손잡이에 테두리 */
.bk-part_compare .bk-ba__range{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;pointer-events:none;-webkit-appearance:none;appearance:none}
.bk-part_compare:has(.bk-ba__range:focus-visible) .bk-part_compare-knob{outline:2px solid var(--color-black,CanvasText);outline-offset:3px}/* 편집기 캔버스(밀기 없음 · [data-bk-ba] 없음) — 세로선 · 손잡이 · 전후 표시를 눌러 그 요소 설정을 연다(block.php drill) */
.bk-part_compare:not([data-bk-ba]) :is(.bk-part_compare-bar,.bk-part_compare-tag){pointer-events:auto;cursor:pointer}
.bk-part_compare:not([data-bk-ba]) .bk-part_compare-bar{width:max(var(--cp-line-w),8px);background:linear-gradient(var(--cp-line-c),var(--cp-line-c)) center/var(--cp-line-w) 100% no-repeat}
