.snapshot-img {
    max-height: 300px;
    object-fit: contain;
}

.face-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #dee2e6;
}

.face-card {
    padding: 4px;
}

/* 인물 관리 - 원형 얼굴 썸네일 */
.person-thumb-wrap {
    width: 120px;
    height: 120px;
    margin: 16px auto 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dee2e6;
    background: #f8f9fa;
    isolation: isolate;  /* overflow:hidden + border-radius 클리핑 보장 */
}

.person-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 눈썹 중앙이 원의 1/3 지점에 오도록:
       세로 overflow ~27px, 눈썹을 14px 내리면 40px(1/3) 위치 → Y=14/27≈50% */
    object-position: center 50%;
    display: block;
}

.person-thumb-placeholder {
    width: 120px;
    height: 120px;
    margin: 16px auto 0;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.person-card {
    transition: box-shadow 0.2s, border-color 0.2s;
}

.person-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.person-card.selected {
    border-color: #0d6efd !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.person-card.deleted-card {
    opacity: 0.7;
}

.person-card.deleted-card:hover {
    opacity: 1;
}

/* 라벨링 화면의 대표 얼굴 — 컨테이너는 overflow: visible 로 연필 안 잘리게,
   안쪽 .label-face-wrap 만 동그랗게 자름. */
.rep-face-container {
    position: relative;
    width: 160px;
    margin: 0 auto;
    /* overflow visible (default) — 연필 버튼이 wrap 밖으로 약간 튀어나와도 안 잘림 */
}

.label-face-wrap {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dee2e6;
    background: #f8f9fa;
    position: relative;
}

.label-face-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
    display: block;
}

/* 대표사진 변경 연필 버튼 — 좌하단, wrap 의 형제 (overflow 영향 없음) */
.rep-face-container .rep-edit-btn {
    position: absolute;
    left: 6px; bottom: 6px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(13, 110, 253, .95);
    color: #fff; border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    z-index: 2;
}
.rep-face-container .rep-edit-btn:hover { background: #0d6efd; }

/* 대표사진 / 자동 분리 매트릭스 — 균일 작은 크기, 바둑판 6칼럼+ */
.rep-pick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
@media (min-width: 1400px) { .rep-pick-grid { grid-template-columns: repeat(8, 1fr); } }
@media (max-width: 991px)  { .rep-pick-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 767px)  { .rep-pick-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px)  { .rep-pick-grid { grid-template-columns: repeat(3, 1fr); } }

.rep-pick-item {
    position: relative;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    text-align: center;
    transition: border-color .08s, background .08s;
    user-select: none;
}
.rep-pick-item:hover { background: #f1f5f9; }
.rep-pick-item.active { border-color: #0d6efd; background: #e7f1ff; }
.rep-pick-item img {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px;
    background: #ddd; display: block;
}
.rep-pick-item .sim {
    display: block; font-size: .65rem; margin-top: 1px; font-weight: 600;
    line-height: 1.1;
}
.rep-pick-item .sim.r { color: #d32f2f; }
.rep-pick-item .sim.y { color: #b88700; }
.rep-pick-item .sim.g { color: #2e7d32; }
.rep-pick-item small {
    font-size: .62rem; line-height: 1.1;
}
/* 체크박스 — 좌상단 작은 크기 */
.rep-pick-item .form-check-input {
    width: 14px; height: 14px;
    margin: 0;
    top: 4px; left: 4px;
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0,0,0,.4);
}

/* 자동 분리 모달 — 합병 매트릭스 헤더 sticky (modal-body 스크롤 시) */
.as-merge-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;   /* card-header 기본색 (light bg) */
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

/* 액션바 */
.action-bar {
    position: sticky;
    top: 0;
    z-index: 100;
}
