/* 게시글 분할 / 말풍선 추출 UI */

:root {
	/* split-accent 위에 올라가는 텍스트 색 — 라공의 `--btn-accent-text` 따라감 (accent 색이 바뀌어도 컨트라스트 유지). */
	--split-accent-fg: var(--btn-accent-text, #fff);
}

/* 헤더 버튼 — 편집 모드일 때만 노출 */
.bbs-btn.splitbtn,
.bbs-btn.exportbtn,
.bbs-btn.classifybtn {
	display: none;
}
body.chat-edit-on .bbs-btn.splitbtn,
body.chat-edit-on .bbs-btn.exportbtn,
body.chat-edit-on .bbs-btn.classifybtn {
	display: inline-flex;
}

/* 분할 모드 활성 시 본문 위에 띄우는 안내 바 */
.split-mode-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 10px 14px;
	background: var(--split-accent, var(--accent-color, #1a73e8));
	color: var(--split-accent-fg, #fff);
	font-size: 14px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.split-mode-bar .split-msg {
	flex: 1;
	line-height: 1.3;
}
.split-mode-bar button {
	background: rgba(255, 255, 255, 0.18);
	color: var(--split-accent-fg, #fff);
	border: 1px solid rgba(255, 255, 255, 0.4);
	padding: 6px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.split-mode-bar button.primary {
	background: var(--split-accent-fg, #fff);
	color: var(--split-accent, var(--accent-color, #1a73e8));
	font-weight: var(--bbs-fw-semi, 600);
}
.split-mode-bar button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 메시지 사이 경계 마커 — split 모드에서만 표시 */
body.chat-split-on #bo_v_con .bubble-wrap {
	position: relative;
}
body.chat-split-on .split-boundary {
	display: block;
	width: 100%;
	height: 18px;
	margin: 4px 0;
	border: 1px dashed color-mix(in srgb, var(--split-accent, var(--accent-color, #1a73e8)) 55%, transparent);
	border-radius: 4px;
	background: color-mix(in srgb, var(--split-accent, var(--accent-color, #1a73e8)) 6%, transparent);
	cursor: pointer;
	text-align: center;
	line-height: 16px;
	font-size: 11px;
	color: var(--split-accent, var(--accent-color, #1a73e8));
	user-select: none;
	transition: background var(--bbs-anim-base, 0.15s), border-color var(--bbs-anim-base, 0.15s);
}
body.chat-split-on .split-boundary:hover {
	background: color-mix(in srgb, var(--split-accent, var(--accent-color, #1a73e8)) 18%, transparent);
	border-color: var(--split-accent, var(--accent-color, #1a73e8));
}
body.chat-split-on .split-boundary.is-selected {
	background: var(--split-accent, var(--accent-color, #1a73e8));
	color: var(--split-accent-fg, #fff);
	border-style: solid;
	font-weight: var(--bbs-fw-semi, 600);
}

/* 경계 선택 후 위/아래 라벨 (CSS 변수로 토글) */
body.chat-split-on #bo_v_con .con_message {
	transition: box-shadow var(--bbs-anim-base, 0.15s), opacity var(--bbs-anim-base, 0.15s);
}
body.chat-split-on #bo_v_con .con_message[data-split-side="upper"] {
	box-shadow: inset 4px 0 0 var(--split-upper, #34a853);
}
body.chat-split-on #bo_v_con .con_message[data-split-side="lower"] {
	box-shadow: inset 4px 0 0 var(--split-lower, #fbbc04);
}

/* overlap 체크박스 — 말풍선 바깥, 시간(bubble-time)과 같은 column·말풍선 상단.
   .first(왼쪽 말풍선): 시간이 말풍선 오른쪽 → 체크박스도 오른쪽 외부, 순서 [☐ 양쪽 포함]
   .second(오른쪽 말풍선): 시간이 왼쪽 → 체크박스도 왼쪽 외부, 순서 [양쪽 포함 ☐] (flex row-reverse) */
body.chat-split-on .con_message .split-overlap-toggle {
	position: absolute;
	top: 0;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	color: inherit;
	border: 0;
	padding: 2px 4px;
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	opacity: 0.85;
}
body.chat-split-on .con_message .split-overlap-toggle:hover {
	opacity: 1;
}
/* 기본 = first(왼쪽 말풍선): 말풍선 오른쪽 바깥 */
body.chat-split-on .con_message .split-overlap-toggle {
	left: 100%;
	right: auto;
	margin-left: 8px;
	margin-right: 0;
	flex-direction: row;
}
/* second(오른쪽 말풍선): 말풍선 왼쪽 바깥 + 텍스트가 체크박스 왼쪽 */
body.chat-split-on .con_message.second .split-overlap-toggle {
	right: 100%;
	left: auto;
	margin-right: 8px;
	margin-left: 0;
	flex-direction: row-reverse;
}
body.chat-split-on .con_message .split-overlap-toggle input {
	margin: 0;
	cursor: pointer;
}
body.chat-split-on .con_message[data-split-overlap="1"] {
	outline: 2px solid var(--split-lower, #fbbc04);
	outline-offset: -2px;
}
body.chat-split-on .con_message[data-split-overlap="1"] .split-overlap-toggle {
	color: var(--split-overlap, #f29900);
	font-weight: var(--bbs-fw-bold, 700);
	opacity: 1;
}

/* split 모드 진입 시 기존 con_message_btn 숨김 (edit/delete 등 액션은 잠시 비활성) */
body.chat-split-on .con_message_btn {
	display: none;
}

/* split/export/classify 모드에서 시간 표시 잠깐 숨김 — 체크박스/마커/뱃지가 그 자리 근처라 시각 겹침 방지 */
body.chat-split-on .bubble-time,
body.chat-export-on .bubble-time,
body.chat-classify-on .bubble-time {
	visibility: hidden !important;
}

/* ==================== 추출 모드 ==================== */
body.chat-export-on #bo_v_con .bubble-wrap {
	position: relative;
}
body.chat-export-on .con_message[data-export-picked="1"] {
	outline: 2px solid var(--split-upper, #34a853);
	outline-offset: -2px;
}
body.chat-export-on .con_message[data-export-keep="1"] {
	outline-color: var(--split-lower, #fbbc04);
}

/* 추출/원본 유지 체크박스 — 시간(bubble-time)과 같은 column, 말풍선 상단 */
body.chat-export-on .con_message .export-pick-toggle,
body.chat-export-on .con_message .export-keep-toggle {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	color: inherit;
	border: 0;
	padding: 2px 4px;
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	opacity: 0.85;
}
body.chat-export-on .con_message .export-pick-toggle:hover,
body.chat-export-on .con_message .export-keep-toggle:hover {
	opacity: 1;
}
/* first(왼쪽): 말풍선 오른쪽 외부 — 추출(상단) / 원본 유지(상단+간격) */
body.chat-export-on .con_message .export-pick-toggle {
	left: 100%;
	top: 0;
	margin-left: 8px;
	flex-direction: row;
}
body.chat-export-on .con_message .export-keep-toggle {
	left: 100%;
	top: 16px;
	margin-left: 8px;
	flex-direction: row;
}
/* second(오른쪽): 말풍선 왼쪽 외부 + 텍스트가 체크박스 왼쪽 */
body.chat-export-on .con_message.second .export-pick-toggle {
	right: 100%;
	left: auto;
	margin-right: 8px;
	margin-left: 0;
	flex-direction: row-reverse;
}
body.chat-export-on .con_message.second .export-keep-toggle {
	right: 100%;
	left: auto;
	margin-right: 8px;
	margin-left: 0;
	flex-direction: row-reverse;
}
body.chat-export-on .con_message .export-pick-toggle input,
body.chat-export-on .con_message .export-keep-toggle input {
	margin: 0;
	cursor: pointer;
}
body.chat-export-on .con_message[data-export-picked="1"] .export-pick-toggle {
	color: var(--split-upper, #1e8e3e);
	font-weight: var(--bbs-fw-bold, 700);
	opacity: 1;
}
body.chat-export-on .con_message[data-export-keep="1"] .export-keep-toggle {
	color: var(--split-overlap, #f29900);
	font-weight: var(--bbs-fw-bold, 700);
	opacity: 1;
}
body.chat-export-on .con_message_btn {
	display: none;
}

/* ==================== 썰 분류 (색칠) 모드 ==================== */
body.chat-classify-on #bo_v_con .bubble-wrap {
	position: relative;
	cursor: pointer;
}
body.chat-classify-on #bo_v_con .con_message {
	position: relative;
	transition: outline-color var(--bbs-anim-base, 0.15s);
}
body.chat-classify-on .con_message[data-classify-bucket] {
	outline: 2px solid var(--classify-color, #888);
	outline-offset: -2px;
}
/* 버킷 번호 뱃지 — 색만으론 버킷이 많을 때 헷갈리므로 번호 병기.
   ⚠️ ::after 금지: 말풍선 꼬리가 .con_message.first/.second::after 로 그려짐(grid 테마) —
   ::after 를 쓰면 꼬리 스타일과 합쳐져 꼬리 자리에 색 덩어리가 생긴다. ::before 는 미사용이라 안전. */
body.chat-classify-on .con_message[data-classify-bucket]::before {
	content: attr(data-classify-bucket);
	position: absolute;
	top: -8px;
	left: -8px;
	min-width: 17px;
	height: 17px;
	padding: 0 3px;
	box-sizing: border-box;
	border-radius: 9px;
	background: var(--classify-color, #888);
	color: #fff;
	font-size: 11px;
	line-height: 17px;
	font-weight: var(--bbs-fw-bold, 700);
	text-align: center;
	z-index: 3;
	pointer-events: none;
}
body.chat-classify-on .con_message.second[data-classify-bucket]::before {
	left: auto;
	right: -8px;
}
/* 범위 모드 첫 탭 표시 */
body.chat-classify-on .bubble-wrap.classify-range-anchor .con_message {
	outline: 2px dashed var(--split-accent, var(--accent-color, #1a73e8));
	outline-offset: 2px;
}
body.chat-classify-on .con_message_btn {
	display: none;
}

/* 분류 모드 바 — 버킷 칩 */
.classify-mode-bar {
	flex-wrap: wrap;
}
.classify-mode-bar .split-msg {
	flex-basis: 100%;
	font-size: 12px;
	opacity: 0.92;
}
.classify-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	align-items: center;
	flex: 1;
	min-width: 0;
}
.classify-chip {
	width: 27px;
	height: 27px;
	border-radius: 50%;
	border: 2px solid transparent;
	background: var(--chip-color, #888);
	color: #fff;
	font-size: 12px;
	font-weight: var(--bbs-fw-bold, 700);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: transform var(--bbs-anim-fast, 0.12s), box-shadow var(--bbs-anim-fast, 0.12s);
}
.classify-chip:hover {
	transform: scale(1.1);
}
.classify-chip.active {
	border-color: var(--split-accent-fg, #fff);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25), 0 0 0 4px var(--split-accent-fg, #fff);
	transform: scale(1.12);
}
/* [CUSTOM(takemd)] 2026-09-29 칩은 제 그룹 색을 지킨다(사용자 「분류모드는 컬러로 구분해야 돼서, 컬러 다 똑같으면 안 돼」).
   막대 안 단추 공통 규칙(.split-mode-bar button — 둥글림 6px, button.active — 바탕 = 막대 글자색)이 특이도로 칩을 이겨
   칩이 네모가 되고 켜진 칩이 그룹 색 대신 검정/흰 판이 됐다. 막대가 어떤 색이든(포인트가 초록이면 2번 초록 칩이 묻혔다) 보이게
   흰 테두리 + 옅은 그늘, 켜진 칩은 색은 그대로 두고 고리로만. 더하기·지우개 칩(.classify-chip-add·-eraser)은 제 모양 그대로 */
.split-mode-bar .classify-chip:not(.classify-chip-add, .classify-chip-eraser) {
	background: var(--chip-color, #888);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
	padding: 0;
}
.split-mode-bar .classify-chip.active:not(.classify-chip-add, .classify-chip-eraser) {
	background: var(--chip-color, #888);
	color: #fff;
	border-color: #fff;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 0 4px #fff;
	font-weight: var(--bbs-fw-bold, 700);
}
.split-mode-bar :is(.classify-chip-add, .classify-chip-eraser) {
	border-radius: 50%;
	padding: 0;
}
.classify-chip-add,
.classify-chip-eraser {
	background: rgba(255, 255, 255, 0.16);
	border: 2px dashed rgba(255, 255, 255, 0.55);
	color: var(--split-accent-fg, #fff);
	font-size: 13px;
}
.classify-chip-eraser {
	border-style: solid;
	font-size: 11px;
}
.classify-counter {
	font-size: 11px;
	opacity: 0.85;
	white-space: nowrap;
}
.split-mode-bar button.active {
	background: var(--split-accent-fg, #fff);
	color: var(--split-accent, var(--accent-color, #1a73e8));
	font-weight: var(--bbs-fw-semi, 600);
}

/* 분류 대상 지정 모달 */
.classify-target-modal {
	width: min(520px, 94vw);
}
.classify-target-help {
	margin: 0 0 12px;
	font-size: 12px;
	color: var(--bbs-modal-muted-fg, #555);
	line-height: 1.45;
}
/* [CUSTOM(takemd)] flex-wrap 필수 — 아래 .classify-existing-hint 가
   flex-basis:100% 라, 줄바꿈이 없으면 같은 줄에 끼어들며 제목 입력칸을
   0폭까지 밀어낸다(실제로 그렇게 깨졌었다). wrap 을 켜야 힌트가 제 줄로 내려간다. */
.classify-target-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.classify-dot {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--classify-color, #888);
	color: #fff;
	font-size: 11px;
	font-weight: var(--bbs-fw-bold, 700);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.classify-row-count {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--bbs-modal-muted-fg, #777);
	min-width: 34px;
}
.classify-target-row .classify-subject {
	flex: 1 1 160px;
	min-width: 120px;
}
.classify-existing-wrap {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.classify-target-row .classify-existing {
	flex: 0 0 96px;
	width: 96px;
}
/* 이 버튼만은 취소색을 물려받지 않게 한다 — 행 안의 보조 동작이라 중립으로. */
.split-modal .classify-pick-btn {
	flex: 0 0 auto;
	padding: 6px 9px;
	font-size: 12px;
	white-space: nowrap;
	background: var(--bbs-modal-btn-ghost-bg, #f1f3f4);
	border-color: var(--bbs-modal-border, #d0d2d4);
}
.classify-existing-hint {
	flex: 1 1 100%;
	margin-left: 30px;
	font-size: 11px;
	line-height: 1.4;
	color: var(--bbs-modal-muted-fg, #777);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.classify-existing-hint.is-bad {
	color: var(--bbs-danger, #d93025);
}
.split-modal .classify-keep-all {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	font-size: 13px;
	cursor: pointer;
}
.split-modal .classify-keep-all input {
	margin: 0;
}

/* 미리보기 / 결과 목록 */
.classify-preview-list {
	max-height: min(50vh, 420px);
	overflow-y: auto;
	border: 1px solid var(--bbs-modal-border, #e0e0e0);
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 13px;
	line-height: 1.5;
}
.classify-preview-item {
	padding: 3px 0;
	border-bottom: 1px dashed color-mix(in srgb, var(--bbs-modal-border, #ccc) 55%, transparent);
	word-break: break-word;
}
.classify-preview-item:last-child {
	border-bottom: 0;
}
.classify-preview-item b {
	margin-right: 6px;
}
.classify-preview-empty {
	color: var(--bbs-modal-muted-fg, #888);
	text-align: center;
	padding: 12px 0;
}
.split-modal h3 .classify-dot {
	vertical-align: -4px;
	margin-right: 4px;
}

/* 모달 (제목 입력) */
.split-modal-backdrop {
	position: fixed;
	inset: 0;
	background: var(--bbs-overlay-bg, rgba(0, 0, 0, 0.45));
	z-index: var(--z-modal-stacked, 10100);
	display: flex;
	align-items: center;
	justify-content: center;
}
.split-modal {
	background: var(--bbs-modal-bg, #fff);
	color: var(--bbs-modal-fg, #222);
	width: min(420px, 90vw);
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	border: 1px solid var(--bbs-modal-border, transparent);
}
.split-modal h3 {
	margin: 0 0 12px;
	font-size: 16px;
}
.split-modal label {
	display: block;
	font-size: 13px;
	color: var(--bbs-modal-muted-fg, #555);
	margin-bottom: 6px;
}
.split-modal input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid var(--bbs-modal-border, #ccc);
	border-radius: 6px;
	font-size: 14px;
	background: var(--bbs-modal-bg, #fff);
	color: var(--bbs-modal-fg, #222);
}
/* [CUSTOM(takemd)] 입력칸이 둘 이상일 때(제목 + 부제목) 다음 라벨이 앞 입력칸에
   달라붙지 않게 간격을 준다. input 자체엔 margin 이 없어서 필요. */
.split-modal input[type="text"] + label {
	margin-top: 14px;
}
.split-modal .modal-row {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}
/* [CUSTOM(takemd)] 취소 계열은 따뜻한 살구, 실행(primary) 은 액센트 — 공용
   다이얼로그(.bbs-dialog-btn) 와 같은 색 규칙을 써서 모달끼리 톤을 맞춘다. */
.split-modal button {
	background: var(--bbs-modal-btn-ghost-bg, #f1f3f4);
	background: color-mix(in srgb, var(--bbs-cancel-tint, #d98d55) 16%, var(--bbs-modal-bg, #fff));
	color: var(--bbs-modal-fg, #333);
	border: 1px solid var(--bbs-modal-border, #d0d2d4);
	border-color: color-mix(in srgb, var(--bbs-cancel-tint, #d98d55) 45%, var(--bbs-modal-bg, #fff));
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.split-modal button.primary {
	background: var(--split-accent, var(--accent-color, #1a73e8));
	color: var(--split-accent-fg, #fff);
	border-color: var(--split-accent, var(--accent-color, #1a73e8));
}
.split-modal button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ============ 모바일 (~768px) ============ */
@media (max-width: 768px) {
	.split-mode-bar {
		flex-wrap: wrap;
		gap: 6px;
		padding: 8px 10px;
		font-size: 12px;
	}
	.split-mode-bar .split-msg {
		flex-basis: 100%;
		font-size: 12px;
		line-height: 1.35;
	}
	.split-mode-bar button {
		padding: 5px 10px;
		font-size: 12px;
	}
	body.chat-split-on .split-boundary {
		height: 16px;
		font-size: 10px;
		line-height: 14px;
		margin: 2px 0;
	}
	body.chat-split-on .con_message .split-overlap-toggle,
	body.chat-export-on .con_message .export-pick-toggle,
	body.chat-export-on .con_message .export-keep-toggle {
		font-size: 10px;
		padding: 2px 3px;
	}
	.classify-chip {
		width: 30px;
		height: 30px; /* 모바일 탭 히트영역 확보 */
	}
	.classify-counter {
		flex-basis: 100%;
	}
	.classify-target-row {
		flex-wrap: wrap;
	}
	.classify-target-row .classify-existing {
		flex: 1 1 100%;
	}
	.split-modal {
		padding: 14px;
	}
	.split-modal h3 {
		font-size: 15px;
	}
}


/* ============================================================
   기존 글 고르기 픽커 (.pp-*) — <datalist> 대체.
   추출 모달엔 인라인으로, 분류 모달엔 팝오버로 같은 위젯을 쓴다.
   ============================================================ */
.pp-root {
	display: block;
}
.split-modal .pp-search {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid var(--bbs-modal-border, #ccc);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background: var(--bbs-modal-bg, #fff);
	color: var(--bbs-modal-fg, #222);
}
.pp-meta {
	margin: 6px 2px;
	font-size: 11px;
	color: var(--bbs-modal-muted-fg, #777);
}
.pp-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: min(300px, 42vh);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--bbs-modal-border, #ddd);
	border-radius: 8px;
	background: var(--bbs-modal-bg, #fff);
}
.pp-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	cursor: pointer;
	border-bottom: 1px solid var(--bbs-modal-border, #eee);
}
.pp-item:last-child {
	border-bottom: 0;
}
.pp-item:hover,
.pp-item.is-active {
	background: color-mix(in srgb, var(--bbs-ui-accent-bg, #1a73e8) 10%, var(--bbs-modal-bg, #fff));
}
.pp-item.is-selected {
	background: color-mix(in srgb, var(--bbs-ui-accent-bg, #1a73e8) 18%, var(--bbs-modal-bg, #fff));
}
.pp-num {
	flex: 0 0 auto;
	min-width: 46px;
	font-size: 11px;
	font-weight: var(--bbs-fw-bold, 700);
	color: var(--bbs-modal-muted-fg, #888);
	font-variant-numeric: tabular-nums;
}
.pp-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}
.pp-title {
	font-size: 13px;
	line-height: 1.35;
	color: var(--bbs-modal-fg, #222);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pp-sub {
	font-size: 11px;
	line-height: 1.35;
	color: var(--bbs-modal-muted-fg, #888);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* 선택 표시는 체크로도 준다 — 배경색만으론 색약일 때 구분이 어렵다. */
.pp-check {
	flex: 0 0 auto;
	width: 14px;
	font-size: 13px;
	font-weight: var(--bbs-fw-bold, 700);
	color: var(--bbs-ui-accent-bg, #1a73e8);
	visibility: hidden;
}
.pp-item.is-selected .pp-check {
	visibility: visible;
}
.pp-item-raw .pp-title {
	font-style: italic;
	color: var(--bbs-modal-muted-fg, #777);
}
.pp-empty {
	padding: 16px 10px;
	text-align: center;
	font-size: 12px;
	color: var(--bbs-modal-muted-fg, #888);
}
.pp-chosen {
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--bbs-modal-muted-fg, #888);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pp-chosen.is-set {
	color: var(--bbs-modal-fg, #222);
	font-weight: var(--bbs-fw-semi, 600);
}
/* 분류 모달 위에 한 겹 더 뜨는 팝오버 — 아래 모달보다 확실히 위로. */
.pp-popover-backdrop {
	z-index: calc(var(--z-modal-stacked, 10100) + 10);
}
.split-modal.pp-popover {
	width: min(480px, 92vw);
}
@media (max-width: 768px) {
	.pp-list {
		max-height: 46vh;
	}
	.classify-existing-wrap {
		flex: 1 1 100%;
	}
	.classify-target-row .classify-existing {
		flex: 1 1 auto;
		width: auto;
	}
	.classify-existing-hint {
		margin-left: 0;
	}
}

/* [CUSTOM(takemd)] 모바일 터치 타깃 되돌리기.
   위 768px 블록들은 모드 바 컨트롤을 데스크톱보다 더 작게 만든다
   (버튼 28px, 경계선 16px, 토글 padding 2px 3px). 폭을 아끼려던 것 같은데
   바는 이미 flex-wrap + `.split-msg{flex-basis:100%}` 라 버튼이 제 줄을 통째로
   쓴다 — 375px 중 90px 밖에 안 쓰니 높이를 깎아서 버는 게 없다.
   손가락이 닿아야 하는 쪽이라 높이만 되돌린다.
   ⚠️ **가로는 늘리지 말 것.** 오버랩 토글은 말풍선 바깥(`left:100%`)에 절대배치라
   왼쪽 말풍선에서 오른쪽 끝이 361px — 화면(375)까지 14px 밖에 안 남는다.
   이 블록은 위 두 블록보다 뒤에 와야 이긴다(같은 768px, 명시도 동일 → 순서 싸움).
   실측 기준(375x812, 말풍선 258개): 취소/분할 38x28, 경계선 375x16,
   토글 55x17(안의 기본 체크박스 13x13). */
@media (max-width: 768px) {
	.split-mode-bar button {
		min-height: 36px;
		padding: 7px 12px;
	}

	/* 경계선은 말풍선마다 하나라 257개 — 높이를 키우면 글 전체가 그만큼 길어진다.
	   28px 이면 탭은 되면서 늘어나는 스크롤은 감당할 만하다(+12px x 257).
	   ::after 로 겹쳐 넓히는 방법은 여기선 못 쓴다 — 바로 아래 오버랩 토글까지
	   세로 간격이 6px 뿐이라(실측) 겹치면 서로 탭을 훔친다.
	   실제 높이를 키우는 건 레이아웃이 밀리는 것이라 그 6px 은 그대로 유지된다. */
	body.chat-split-on .split-boundary {
		height: 28px;
		line-height: 26px;
		font-size: 11px;
		margin: 4px 0;
	}

	/* 라벨이 곧 히트영역이다(체크박스를 감싸고 있어 라벨 아무 데나 눌러도 토글된다).
	   절대배치라 높이를 키워도 아무것도 밀지 않는다. */
	body.chat-split-on .con_message .split-overlap-toggle,
	body.chat-export-on .con_message .export-pick-toggle,
	body.chat-export-on .con_message .export-keep-toggle {
		min-height: 30px;
		/* 세로만 키운다. 가로 padding 을 5px 로 뒀더니 폭이 55→62 가 되어
		   오른쪽 끝이 368px, 화면(375)까지 7px 밖에 안 남았다 → 3px 로 되돌림. */
		padding: 4px 3px;
	}

	body.chat-split-on .con_message .split-overlap-toggle input,
	body.chat-export-on .con_message .export-pick-toggle input,
	body.chat-export-on .con_message .export-keep-toggle input {
		width: 16px;
		height: 16px;
	}

	/* 색 칩은 27px(데스크톱) → 30px 로 이미 한 번 키웠는데 여전히 작다.
	   칩 줄은 바 안에서 제 줄을 쓰므로 36px 이어도 가로가 모자라지 않는다. */
	.classify-chip,
	.classify-chip-add,
	.classify-chip-eraser {
		width: 36px;
		height: 36px;
	}
}

/* [CUSTOM(takemd)] 수식키 안내 감추기.
   모드 바 안내문이 "Shift+클릭: 범위 선택", "Alt+클릭=같은 화자 연속 턴 전체" 를
   안내하는데 터치에는 수식키가 없다 — 폰에서 못 하는 조작을 설명하는 줄이
   가뜩이나 좁은 바(분류 모드는 141px, 뷰포트의 17%)를 차지하고 있었다.
   폭이 아니라 입력 방식이 기준이라 여기만 max-width 대신 hover/pointer 로 묻는다
   (키보드 달린 태블릿은 hover:none 이어도 pointer:fine 이라 안내가 남는다). */
@media (hover: none) and (pointer: coarse) {
	.split-mode-bar .pointer-hint {
		display: none;
	}
}

/* [CUSTOM(takemd)] 실행/대상 모달들의 모바일 잔여분.
   1) .split-modal 에 max-height 가 없어 분류 그룹 ~6개부터 실행·취소가 화면
      밖이었다(백드롭이 flex 중앙 고정이라 스크롤 불가). dvh + 내부 스크롤.
   2) 모달 입력 전부 14px — 열리자마자 자동 포커스라 iOS 가 즉시 확대했고
      닫아도 확대가 남았다.
   3) '원본 유지' 토글이 top:16px 고정 — 모바일 블록이 두 토글을 30px 로 키우며
      top 을 안 옮겨 '추출' 토글 아래 절반(14px)을 덮고 탭을 훔쳤다. */
.split-modal {
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
	.split-modal input[type="text"],
	.split-modal select,
	.split-modal textarea,
	.split-modal .pp-search {
		font-size: 16px;
	}

	body.chat-export-on .con_message .export-keep-toggle {
		top: 32px;
	}

	/* 새 글/기존 글 라디오 줄(~20px)과 분류 행 '고르기'(~29px) 터치 승격 */
	.split-modal label {
		min-height: 30px;
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}
	.split-modal input[type="radio"] {
		width: 18px;
		height: 18px;
	}
	.classify-target-row .classify-pick-btn,
	.classify-target-row button {
		min-height: 34px;
	}
}
