/* Community Chat — 카카오톡 스타일 말풍선 UI */

/* 카카오 브랜드 옐로우 (메시지) / 배경 톤 */
:root {
	--cc-kakao-yellow: #fee500;
	--cc-kakao-yellow-text: #191919;
	--cc-chat-bg: #b4c0d0;
	--cc-bubble-other: #ffffff;
	--cc-border-soft: rgba(0, 0, 0, 0.06);
	--cc-header-bg: #ffffff;
	--cc-input-bg: #f5f5f5;
	/* 헤더: ✉️문의 버튼과 동일한 높이로 pill/버튼 정렬 */
	--cc-header-control-h: 30px;
}

.community-chat-wrap {
	max-width: 100%;
	margin: 1rem auto 2rem;
	padding: 0;
	border: none;
	border-radius: 12px;
	background: var(--cc-header-bg);
	box-shadow:
		0 0 1px rgba(0, 0, 0, 0.08),
		0 4px 24px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}

/* 테마 숏코드 [kh24_today_visitors] — 채팅창 최상단 */
.community-chat-visitor-bar {
	padding: 8px 14px;
	font-size: 0.8rem;
	font-weight: 700;
	text-align: center;
	color: #424242;
	background: linear-gradient(180deg, #fff9e6 0%, #fffef5 100%);
	border-bottom: 1px solid rgba(255, 193, 7, 0.35);
	line-height: 1.35;
}

.community-chat-visitor-bar .kh24-today-visitors__num {
	color: #e53935;
	font-weight: 800;
}

.community-chat-wrap--preview .community-chat-visitor-bar {
	padding: 6px 12px;
	font-size: 0.76rem;
}

/* 상단 바 (채팅방 헤더 느낌) */
.community-chat-header {
	padding: 12px 16px;
	background: var(--cc-header-bg);
	border-bottom: 1px solid #e9e9e9;
}

.community-chat-header-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
}

.community-chat-header-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 10px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.community-chat-header-actions--left,
.community-chat-header-actions--right {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	min-width: 0;
}

.community-chat-header-actions--left {
	justify-content: flex-start;
	flex: 1 1 auto;
}

.community-chat-header-actions--right {
	justify-content: flex-end;
	margin-left: auto;
	flex: 1 1 auto;
}

.community-chat-header-search-wrap {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex: 1 1 140px;
	min-width: 0;
	max-width: 280px;
	justify-content: flex-end;
}

.community-chat-search-input {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 220px;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 10px;
	font-size: 0.78rem;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	background: #fafafa;
	line-height: 1.2;
}

.community-chat-search-input:focus {
	outline: none;
	border-color: #bdbdbd;
	background: #fff;
}

.community-chat-search-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--cc-header-control-h);
	height: var(--cc-header-control-h);
	min-width: var(--cc-header-control-h);
	min-height: var(--cc-header-control-h);
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #757575;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.community-chat-search-clear:hover {
	background: #eeeeee;
	color: #191919;
}

.community-chat-report-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 10px;
	font-size: 0.7rem;
	font-weight: 700;
	color: #1565c0;
	background: #e8f4ff;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: none;
	line-height: 1.2;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.community-chat-report-btn:hover {
	color: #0d47a1;
	background: #d6ebff;
	text-decoration: none;
}

.community-chat-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #191919;
	letter-spacing: -0.02em;
}

.community-chat-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 10px;
	font-size: 0.7rem;
	font-weight: 600;
	border-radius: 999px;
	line-height: 1.2;
}

.community-chat-badge-member {
	background: #e8f4ff;
	color: #1565c0;
}

.community-chat-badge-member .community-chat-anon-label {
	color: rgba(21, 101, 192, 0.85);
}

.community-chat-badge-member strong {
	font-weight: 800;
}

.cc-is-hidden {
	display: none !important;
}

.community-chat-logged-identity,
.community-chat-current-id {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 8px 10px;
	max-width: 100%;
}

.community-chat-mode-toggle {
	display: flex;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid #e0e0e0;
	background: #f5f5f5;
	flex-shrink: 0;
}

.community-chat-mode-btn {
	flex: 1 1 0;
	min-width: 0;
	border: none;
	background: transparent;
	padding: 8px 10px;
	font-size: 0.72rem;
	font-weight: 700;
	cursor: pointer;
	color: #666;
	line-height: 1.2;
	text-align: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.community-chat-mode-btn.is-active {
	background: var(--cc-kakao-yellow);
	color: var(--cc-kakao-yellow-text);
}

.community-chat-mode-btn:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(254, 229, 0, 0.45);
}

.community-chat-badge-guest {
	background: #fff3e0;
	color: #e65100;
}

/* 헤더 오른쪽: ID 표시 (카카오 노란 톤 말풍선) */
.community-chat-badge-anon-bubble {
	max-width: min(100%, 300px);
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 12px 0 14px;
	font-size: 0.72rem;
	font-weight: 600;
	border-radius: 14px;
	background: var(--cc-kakao-yellow);
	color: var(--cc-kakao-yellow-text);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	line-height: 1.2;
}

.community-chat-anon-label {
	font-weight: 600;
}

.community-chat-anon-name {
	font-weight: 800;
	word-break: break-word;
}

/* 공지 (카카오 공지 배너 느낌) */
.community-chat-announcement {
	padding: 10px 14px;
	background: #fff9e6;
	border-bottom: 1px solid #ffe082;
}

.community-chat-announcement-inner {
	font-size: 0.85rem;
	line-height: 1.5;
	color: #5d4037;
}

.community-chat-announcement-inner p {
	margin: 0 0 0.45em;
}

.community-chat-announcement-inner p:last-child {
	margin-bottom: 0;
}

/* 채팅 영역 배경 — 카카오 대화방 톤 */
.community-chat-messages {
	height: var(--community-chat-height, 420px);
	max-height: min(58vh, 560px);
	min-height: 220px;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 14px 12px 18px;
	background: var(--cc-chat-bg);
	scroll-behavior: smooth;
}

/* 한 줄 (왼쪽 상대 / 오른쪽 나) */
.community-chat-msg {
	margin-bottom: 10px;
	clear: both;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.community-chat-msg-inner {
	display: flex;
	align-items: flex-end;
	max-width: 100%;
}

.community-chat-msg:not(.is-mine) .community-chat-msg-inner {
	flex-direction: row;
	justify-content: flex-start;
}

.community-chat-msg.is-mine .community-chat-msg-inner {
	flex-direction: row;
	justify-content: flex-end;
}

/* 프로필: 회원=그라바타, 익명=단색+짧은 텍스트 (오픈채팅 스타일) */
.community-chat-msg-avatar {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	margin-right: 8px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.community-chat-msg.is-mine .community-chat-msg-avatar {
	margin-right: 0;
	margin-left: 8px;
}

.community-chat-msg-avatar-img {
	width: 38px;
	height: 38px;
	object-fit: cover;
	display: block;
	background: #e8e8e8;
}

.community-chat-msg-avatar-fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	font-size: 0.62rem;
	font-weight: 800;
	color: #fff;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
	line-height: 1.05;
	text-align: center;
	padding: 2px;
	box-sizing: border-box;
	word-break: break-all;
}

.community-chat-msg-avatar-fallback-line1 {
	display: block;
	max-width: 100%;
}

.community-chat-msg-avatar-fallback-line2 {
	display: block;
	font-size: 0.58rem;
	font-weight: 800;
	opacity: 0.95;
}

.community-chat-msg-col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: calc(100% - 46px);
	min-width: 0;
}

.community-chat-msg.is-mine .community-chat-msg-col {
	align-items: flex-end;
	max-width: 85%;
}

/* 상대 닉네임 */
.community-chat-msg-author {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 6px;
	font-size: 0.72rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.55);
	margin: 0 0 4px 2px;
	line-height: 1.2;
}

.community-chat-msg-author-name {
	font-weight: 600;
}

/* 관리자·부방장 뱃지 (관리자는 문의 버튼과 유사 톤) */
.community-chat-admin-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 1px 6px 2px;
	font-size: 0.58rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.02em;
	border-radius: 4px;
	color: #fff;
	vertical-align: middle;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.community-chat-admin-badge--owner {
	color: #1565c0;
	background: #e8f4ff;
	border: 1px solid rgba(21, 101, 192, 0.22);
	border-radius: 999px;
	box-shadow: none;
	padding: 2px 8px 3px;
	font-weight: 800;
}

.community-chat-admin-badge--mod {
	background: linear-gradient(180deg, #78909c 0%, #546e7a 100%);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.community-chat-msg-author-mine {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 4px 6px;
	text-align: right;
	margin: 0 2px 4px 0;
	color: rgba(0, 0, 0, 0.52);
}

.community-chat-msg-author-mine .community-chat-msg-author-name {
	font-weight: 600;
}

/* 말풍선 + 시간 한 줄 */
.community-chat-msg-bubble-row {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	gap: 6px;
	max-width: 100%;
}

.community-chat-msg.is-mine .community-chat-msg-bubble-row {
	flex-direction: row;
	justify-content: flex-end;
}

/* 말풍선 + 옆 메타(좋아요·신고) */
.community-chat-msg-bubble-main {
	display: inline-flex;
	flex-direction: row;
	align-items: flex-end;
	gap: 6px;
	min-width: 0;
	max-width: 100%;
	flex: 0 1 auto;
}

.community-chat-msg.is-mine .community-chat-msg-bubble-main {
	order: 2;
}

/* 말풍선 본체 */
.community-chat-msg-body {
	display: inline-block;
	max-width: 100%;
	padding: 9px 12px 8px;
	font-size: 0.94rem;
	line-height: 1.45;
	white-space: pre-wrap;
	border-radius: 4px;
	box-shadow: 0 1px 1px var(--cc-border-soft);
}

/* 상대: 흰 말풍선 */
.community-chat-msg:not(.is-mine) .community-chat-msg-body {
	background: var(--cc-bubble-other);
	color: #191919;
	border-radius: 4px 12px 12px 12px;
}

/* 내 메시지: 노란 말풍선 */
.community-chat-msg.is-mine .community-chat-msg-body {
	background: var(--cc-kakao-yellow);
	color: var(--cc-kakao-yellow-text);
	border-radius: 12px 4px 12px 12px;
}

/* 카카오 링크 미리보기형 — 썸네일 + 제목 + 요약 + 사이트명 */
.community-chat-link-preview {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 6px 0 2px;
	padding: 0;
	overflow: hidden;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	text-decoration: none;
	color: #191919;
	-webkit-tap-highlight-color: transparent;
}

.community-chat-link-preview:hover {
	filter: brightness(0.985);
	text-decoration: none;
	color: #191919;
}

.community-chat-link-preview__thumb {
	flex: 0 0 88px;
	width: 88px;
	min-width: 88px;
	min-height: 88px;
	align-self: stretch;
	background: #eceff1;
	position: relative;
	overflow: hidden;
}

.community-chat-link-preview__thumb img {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.community-chat-link-preview__thumb.is-placeholder::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(135deg, #e0e0e0 0%, #eeeeee 100%);
	opacity: 0.9;
}

.community-chat-link-preview__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 10px 8px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

.community-chat-link-preview__title {
	font-size: 0.84rem;
	font-weight: 700;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.community-chat-link-preview__desc {
	font-size: 0.72rem;
	font-weight: 500;
	line-height: 1.35;
	color: rgba(0, 0, 0, 0.52);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.community-chat-link-preview__site {
	font-size: 0.65rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.38);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.community-chat-link-preview--missing {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 2px;
	max-width: 100%;
	padding: 6px 10px;
	margin: 4px 0 0;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
	border: 1px dashed rgba(0, 0, 0, 0.12);
	font-size: 0.8rem;
	color: #424242;
}

.community-chat-msg-topic-more-muted {
	color: rgba(0, 0, 0, 0.45);
	font-weight: 600;
	font-size: 0.92em;
	cursor: default;
}

.community-chat-msg-body .community-chat-msg-topic-link,
.community-chat-msg-body .community-chat-msg-kboard-link,
.community-chat-msg-body .community-chat-msg-plain-link {
	color: #1565c0;
	text-decoration: underline;
	font-weight: 600;
	word-break: break-all;
}

.community-chat-msg.is-mine .community-chat-msg-body .community-chat-msg-topic-link,
.community-chat-msg.is-mine .community-chat-msg-body .community-chat-msg-kboard-link,
.community-chat-msg.is-mine .community-chat-msg-body .community-chat-msg-plain-link {
	color: #1565c0;
}

/* 시간 — 작은 회색 텍스트 */
.community-chat-msg-time {
	font-size: 0.65rem;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.38);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	line-height: 1.2;
	padding-bottom: 2px;
}

.community-chat-msg.is-mine .community-chat-msg-time {
	order: 1;
	align-self: flex-end;
	margin-right: 2px;
}

.community-chat-msg-time-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	flex-shrink: 0;
	padding-bottom: 2px;
}

/* 관리자 삭제 — 톤 다운 */
.community-chat-msg-delete {
	padding: 2px 6px;
	font-size: 0.62rem;
	font-weight: 600;
	color: #c62828;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 4px;
	cursor: pointer;
	line-height: 1.2;
}

.community-chat-msg-delete:hover {
	background: #ffebee;
}

.community-chat-msg.is-mine .community-chat-msg-delete {
	order: 3;
	align-self: flex-end;
	margin-left: 4px;
}

/* 말풍선 옆 좋아요 + 신고 (한 줄: ❤️ … | 신고) */
.community-chat-msg-meta {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 6px 10px;
	margin-top: 0;
	padding-left: 0;
	font-size: 0.62rem;
	line-height: 1.3;
	flex-shrink: 0;
}

.community-chat-msg-meta.is-mine {
	justify-content: flex-end;
	padding-left: 0;
	padding-right: 0;
}

.community-chat-msg-meta__likes {
	display: inline-flex;
	align-items: center;
}

.community-chat-msg-like {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-width: 2.75rem;
	min-height: 30px;
	padding: 5px 12px 6px;
	font-size: inherit;
	line-height: 1;
	border: none;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.community-chat-msg-like-emoji {
	font-size: 0.9rem;
	line-height: 1;
}

.community-chat-msg-like:hover {
	opacity: 1;
}

.community-chat-msg-like.is-liked {
	opacity: 1;
	filter: none;
	background: rgba(244, 67, 54, 0.1);
}

.community-chat-msg-like-count {
	font-size: 0.65rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: rgba(0, 0, 0, 0.5);
	min-width: 1ch;
	pointer-events: none;
}

.community-chat-msg-report {
	display: inline-flex;
	align-items: center;
	padding: 1px 6px 2px;
	font-size: 0.62rem;
	font-weight: 600;
	color: #5d4037;
	background: rgba(255, 193, 7, 0.2);
	border: 1px solid rgba(255, 152, 0, 0.35);
	border-radius: 10px;
	cursor: pointer;
	line-height: 1.25;
	vertical-align: middle;
}

.community-chat-msg-report:hover:not(:disabled) {
	background: rgba(255, 193, 7, 0.35);
}

.community-chat-msg-report:disabled,
.community-chat-msg-report.is-done {
	opacity: 0.65;
	cursor: default;
}

.community-chat-msg-reported-note {
	color: rgba(0, 0, 0, 0.45);
	font-weight: 500;
}

.community-chat-msg-body--hidden {
	font-style: italic;
	color: rgba(0, 0, 0, 0.45);
}

.community-chat-msg--hidden-by-reports .community-chat-msg-body--hidden {
	white-space: normal;
}

/* 비회원 네 자리 숫자 확인 — 폼 첫 줄 전체 너비 */
.community-chat-guest-verify-wrap {
	flex: 1 0 100%;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 10px;
	padding: 12px 14px;
	border-radius: 12px;
	background: linear-gradient(180deg, #e3f2fd 0%, #e8f4ff 100%);
	border: 1px solid #90caf9;
	box-shadow: 0 1px 4px rgba(21, 101, 192, 0.12);
	opacity: 1;
	transition: opacity 0.35s ease;
}

.community-chat-guest-verify-wrap.is-fading-out {
	opacity: 0;
	pointer-events: none;
}

.community-chat-guest-verify-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

.community-chat-guest-verify-label {
	font-size: 0.78rem;
	font-weight: 800;
	color: #0d47a1;
	letter-spacing: -0.02em;
}

.community-chat-guest-verify-digits {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	font-size: 1.35rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
	color: #0d47a1;
	background: #fff;
	border-radius: 10px;
	border: 1px solid rgba(21, 101, 192, 0.25);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
	min-height: 44px;
}

.community-chat-guest-verify-input {
	width: 6.5rem;
	padding: 8px 10px;
	font-size: 1.1rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: center;
	border: 1px solid #bdbdbd;
	border-radius: 10px;
	background: #fff;
}

.community-chat-guest-verify-input:focus {
	outline: none;
	border-color: #1565c0;
	box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2);
}

.community-chat-guest-verify-btn {
	padding: 9px 16px;
	font-size: 0.88rem;
	font-weight: 800;
	color: #fff;
	background: #1565c0;
	border: none;
	border-radius: 10px;
	cursor: pointer;
}

.community-chat-guest-verify-btn:hover {
	filter: brightness(1.05);
}

.community-chat-guest-verify-btn.is-done,
.community-chat-guest-verify-btn:disabled {
	background: #2e7d32;
	cursor: default;
	filter: none;
}

.community-chat-guest-verify-hint {
	margin: 10px 0 0;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.4;
	color: #1565c0;
}

.community-chat-guest-verify-hint.is-verified {
	color: #2e7d32;
	font-weight: 800;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-wrap {
	background: linear-gradient(180deg, #1e3a5f 0%, #243b55 100%);
	border-color: #42a5f5;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-label {
	color: #e3f2fd;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-digits {
	color: #e3f2fd;
	background: rgba(0, 0, 0, 0.2);
	border-color: rgba(100, 181, 246, 0.45);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-input {
	background: #2a3340;
	border-color: #546e7a;
	color: #eceff1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-hint {
	color: #90caf9;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-btn.is-done,
.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-btn:disabled {
	background: #43a047;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-guest-verify-hint.is-verified {
	color: #81c784;
}

/* 입력 영역 — 하단 바 */
.community-chat-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-end;
	padding: 10px 12px;
	background: var(--cc-input-bg);
	border-top: 1px solid #e0e0e0;
}

.community-chat-input {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	font-size: 16px;
	line-height: 1.45;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	background: #fff;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.community-chat-input:focus {
	outline: none;
	border-color: #bdbdbd;
	box-shadow: 0 0 0 2px rgba(254, 229, 0, 0.35);
}

.community-chat-send {
	flex-shrink: 0;
	padding: 10px 18px;
	min-height: 44px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--cc-kakao-yellow-text);
	background: var(--cc-kakao-yellow);
	border: none;
	border-radius: 20px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
	transition:
		transform 0.1s ease,
		filter 0.15s ease;
}

.community-chat-send:hover:not(:disabled) {
	filter: brightness(0.97);
}

.community-chat-send:active:not(:disabled) {
	transform: scale(0.98);
}

.community-chat-send:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
}

@media (max-width: 600px) {
	.community-chat-wrap {
		border-radius: 10px;
		box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
	}

	.community-chat-messages {
		max-height: min(52vh, 520px);
		min-height: 200px;
		padding-left: 10px;
		padding-right: 10px;
	}

	.community-chat-msg.is-mine .community-chat-msg-col {
		max-width: 88%;
	}

	.community-chat-form {
		flex-direction: row;
		align-items: center;
		padding: 8px 10px;
	}

	.community-chat-send {
		min-height: 42px;
		padding: 10px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.community-chat-messages {
		scroll-behavior: auto;
	}
	.community-chat-send {
		transition: none;
	}
}

/* 메인 미리보기: 최근 N개만, 입력 없음, 더보기 */
.community-chat-wrap--preview .community-chat-header {
	padding: 10px 14px;
}

.community-chat-wrap--preview .community-chat-title {
	font-size: 0.95rem;
}

.community-chat-wrap--preview .community-chat-messages {
	min-height: 120px;
	max-height: min(40vh, 360px);
	padding: 10px 10px 12px;
}

.community-chat-wrap--preview .community-chat-preview-more-top {
	text-align: center;
	padding: 6px 8px 10px;
	margin: 0 0 6px;
	border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.community-chat-preview-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 8px 12px 10px;
	background: var(--cc-input-bg);
	border-top: 1px solid #e0e0e0;
}

a.community-chat-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 12px;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--cc-kakao-yellow-text);
	background: var(--cc-kakao-yellow);
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	transition: filter 0.15s ease;
	line-height: 1.2;
}

a.community-chat-more:hover {
	filter: brightness(0.97);
}

.community-chat-more--disabled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 12px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #9e9e9e;
	cursor: default;
	line-height: 1.2;
	border-radius: 999px;
}

/* 설정(톱니) + 패널 */
.community-chat-settings {
	position: relative;
	flex-shrink: 0;
}

.community-chat-settings-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--cc-header-control-h);
	height: var(--cc-header-control-h);
	min-width: var(--cc-header-control-h);
	min-height: var(--cc-header-control-h);
	padding: 0;
	border: 1px solid rgba(21, 101, 192, 0.25);
	border-radius: 999px;
	background: #e8f4ff;
	cursor: pointer;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}

.community-chat-settings-btn:hover {
	background: #d6ebff;
	border-color: rgba(21, 101, 192, 0.4);
}

.community-chat-settings-btn__gear {
	display: block;
	width: 1.1rem;
	height: 1.1rem;
	background: no-repeat center / contain
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.07.63-.07.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E");
}

.community-chat-settings-panel-top {
	width: 100%;
}

.community-chat-report-btn--panel {
	width: 100%;
	box-sizing: border-box;
	min-height: 38px;
	padding: 8px 12px;
	font-size: 0.78rem;
}

.community-chat-kakao-links {
	margin-top: 0;
}

.community-chat-kakao-links-inner {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.community-chat-kakao-link {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	padding: 9px 12px;
	font-size: 0.74rem;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	color: #3e2723;
	text-decoration: none;
	background: linear-gradient(180deg, #fffde7 0%, #fff9c4 100%);
	border: 1px solid #e6d88a;
	border-radius: 10px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
	transition:
		background 0.15s ease,
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.community-chat-kakao-link:hover {
	color: #3e2723;
	text-decoration: none;
	background: linear-gradient(180deg, #fff9c4 0%, #fff59d 100%);
	border-color: #dcc060;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.community-chat-settings-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 30;
	min-width: 220px;
	max-width: min(92vw, 320px);
	padding: 12px 14px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #e0e0e0;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.community-chat-settings-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.community-chat-settings-label {
	font-size: 0.72rem;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.5);
}

.community-chat-settings-switch {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #191919;
	cursor: pointer;
	user-select: none;
}

.community-chat-settings-switch input {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* 설정: 내가 쓴 글(KBoard) 링크 넣기 */
.community-chat-settings-section--my-posts {
	position: relative;
}

.community-chat-my-posts {
	position: relative;
	width: 100%;
}

.community-chat-my-posts-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	min-height: var(--cc-header-control-h);
	padding: 0 12px;
	font-size: 0.78rem;
	font-weight: 700;
	color: #1565c0;
	background: #e8f4ff;
	border: 1px solid rgba(21, 101, 192, 0.25);
	border-radius: 999px;
	cursor: pointer;
	line-height: 1.25;
	transition: background 0.15s ease, color 0.15s ease;
}

.community-chat-my-posts-toggle:hover {
	color: #0d47a1;
	background: #d6ebff;
}

.community-chat-my-posts-dropdown {
	margin-top: 8px;
	padding: 8px 0;
	max-height: 240px;
	overflow-x: hidden;
	overflow-y: auto;
	border-radius: 10px;
	border: 1px solid #e0e0e0;
	background: #fafafa;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.community-chat-my-posts-loading {
	margin: 0;
	padding: 10px 12px;
	font-size: 0.78rem;
	color: rgba(0, 0, 0, 0.55);
	text-align: center;
}

.community-chat-my-posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.community-chat-my-posts-li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #eeeeee;
}

.community-chat-my-posts-li:last-child {
	border-bottom: none;
}

.community-chat-my-posts-item {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	color: #1565c0;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: background 0.12s ease;
}

.community-chat-my-posts-item:hover {
	background: #e3f2fd;
}

.community-chat-my-posts-empty {
	margin: 0;
	padding: 10px 12px;
	font-size: 0.76rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.5);
	text-align: center;
}

/* 다크 모드 — 말풍선·노란색 대비 강화 */
.community-chat-wrap.community-chat-wrap--dark {
	--cc-kakao-yellow: #ffeb3b;
	--cc-kakao-yellow-text: #1a1a1a;
	--cc-chat-bg: #1e2835;
	--cc-bubble-other: #3d4a5c;
	--cc-border-soft: rgba(255, 255, 255, 0.12);
	--cc-header-bg: #222a35;
	--cc-input-bg: #2a3340;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-title,
.community-chat-wrap.community-chat-wrap--dark .community-chat-settings-switch {
	color: #eceff1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg:not(.is-mine) .community-chat-msg-body {
	color: #f5f7fa;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg.is-mine .community-chat-msg-body {
	color: var(--cc-kakao-yellow-text);
	border: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg.is-mine .community-chat-msg-body .community-chat-msg-topic-link,
.community-chat-wrap.community-chat-wrap--dark .community-chat-msg.is-mine .community-chat-msg-body .community-chat-msg-kboard-link,
.community-chat-wrap.community-chat-wrap--dark .community-chat-msg.is-mine .community-chat-msg-body .community-chat-msg-plain-link {
	color: #0d47a1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-header {
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-visitor-bar {
	background: linear-gradient(180deg, #2c3540 0%, #262d38 100%);
	border-bottom-color: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.88);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-visitor-bar .kh24-today-visitors__num {
	color: #ffab91;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-author {
	color: rgba(255, 255, 255, 0.45);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-author-mine {
	color: rgba(255, 255, 255, 0.42);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-admin-badge--owner {
	color: #90caf9;
	background: rgba(100, 181, 246, 0.18);
	border-color: rgba(100, 181, 246, 0.35);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-admin-badge--mod {
	background: linear-gradient(180deg, #90a4ae 0%, #607d8b 100%);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-search-input {
	background: #2a3340;
	border-color: #3d4a5c;
	color: #eceff1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-settings-btn {
	color: #90caf9;
	background: rgba(100, 181, 246, 0.18);
	border: 1px solid rgba(100, 181, 246, 0.35);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-settings-btn:hover {
	background: rgba(100, 181, 246, 0.28);
	border-color: rgba(100, 181, 246, 0.5);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-settings-btn__gear {
	filter: none;
	opacity: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2390caf9'%3E%3Cpath d='M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.07.63-.07.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E");
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-settings-panel {
	background: #2a3340;
	border-color: #3d4a5c;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-toggle {
	color: #90caf9;
	background: rgba(100, 181, 246, 0.18);
	border-color: rgba(100, 181, 246, 0.35);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-toggle:hover {
	color: #bbdefb;
	background: rgba(100, 181, 246, 0.28);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-dropdown {
	border-color: #3d4a5c;
	background: #262d38;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-li {
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-item {
	color: #90caf9;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-item:hover {
	background: rgba(100, 181, 246, 0.12);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-loading,
.community-chat-wrap.community-chat-wrap--dark .community-chat-my-posts-empty {
	color: rgba(255, 255, 255, 0.55);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-mode-toggle {
	border-color: #3d4a5c;
	background: #262d38;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-mode-btn {
	color: rgba(255, 255, 255, 0.65);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-link-preview {
	background: #323c4a;
	border-color: rgba(255, 255, 255, 0.1);
	color: #eceff1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-link-preview__desc {
	color: rgba(255, 255, 255, 0.55);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-link-preview__site {
	color: rgba(255, 255, 255, 0.35);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-input {
	background: #323c4a;
	border-color: #3d4a5c;
	color: #eceff1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg:not(.is-mine) .community-chat-msg-body .community-chat-msg-plain-link {
	color: #90caf9;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-time {
	color: rgba(255, 255, 255, 0.5);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-form {
	border-top-color: rgba(255, 255, 255, 0.1);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-announcement {
	background: #2d3540;
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-announcement-inner {
	color: #eceff1;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-report-btn {
	color: #90caf9;
	background: rgba(100, 181, 246, 0.18);
	border: 1px solid rgba(100, 181, 246, 0.35);
	box-shadow: none;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-report-btn:hover {
	color: #bbdefb;
	background: rgba(100, 181, 246, 0.28);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-kakao-link {
	color: #3e2723;
	background: linear-gradient(180deg, #fffde7 0%, #ffee58 100%);
	border-color: rgba(0, 0, 0, 0.12);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-kakao-link:hover {
	color: #3e2723;
	background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 100%);
	border-color: rgba(0, 0, 0, 0.18);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-delete {
	background: rgba(45, 53, 64, 0.95);
	border-color: rgba(255, 255, 255, 0.12);
	color: #ffab91;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-like-count {
	color: rgba(255, 255, 255, 0.55);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-like.is-liked {
	background: rgba(239, 83, 80, 0.18);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-report {
	color: #ffe082;
	background: rgba(255, 193, 7, 0.12);
	border-color: rgba(255, 213, 79, 0.35);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-reported-note {
	color: rgba(255, 255, 255, 0.45);
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-msg-body--hidden {
	color: rgba(255, 255, 255, 0.5);
}

/* 링크 썸네일 로딩 */
.community-chat-link-preview__thumb.is-image-loading {
	background: linear-gradient(90deg, #eceff1 0%, #f5f5f5 50%, #eceff1 100%);
	background-size: 200% 100%;
	animation: cc-link-thumb-shimmer 1s ease-in-out infinite;
}

.community-chat-wrap.community-chat-wrap--dark .community-chat-link-preview__thumb.is-image-loading {
	background: linear-gradient(90deg, #2c3542 0%, #3d4a5c 50%, #2c3542 100%);
	background-size: 200% 100%;
}

@keyframes cc-link-thumb-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

/* textarea 입력 */
textarea.community-chat-input {
	min-height: 44px;
	max-height: 160px;
	resize: vertical;
	font-family: inherit;
}
