:root {
	--bg: #0c0c0e;
	--sidebar-bg: #111114;
	--surface: #18181b;
	--surface-hover: #1f1f23;
	--border: #27272a;
	--text: #f4f4f5;
	--text-secondary: #a1a1aa;
	--text-muted: #52525b;
	--accent: #4ade80;
	--accent-dim: rgba(74, 222, 128, 0.15);
	--highlight: #facc15;
	--highlight-bg: rgba(250, 204, 21, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
	background: linear-gradient(165deg, #0c0c0e 0%, #0f0c14 50%, #0c0c0e 100%);
	background-attachment: fixed;
	color: var(--text);
	min-height: 100vh;
}

/* 이모지 폰트 폴백 */
.msg-content {
	font-family: 'Pretendard', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

/* 레이아웃 */
.layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	min-height: 100vh;
	transition: grid-template-columns 0.2s ease;
	position: relative;
}

.layout.sidebar-collapsed {
	grid-template-columns: 0px 1fr;
}

.layout.sidebar-collapsed .sidebar {
	transform: translateX(-100%);
}

.sidebar-collapse-btn {
	position: fixed;
	left: 256px;
	top: 120px;
	z-index: 100;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text-secondary);
	font-size: 20px;
	font-weight: bold;
	cursor: grab;
	padding: 8px 12px;
	border-radius: 6px;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, left 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	user-select: none;
}

.layout.sidebar-collapsed .sidebar-collapse-btn {
	left: 8px;
}

.sidebar-collapse-btn:hover {
	color: var(--text);
	background: var(--surface-hover);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sidebar-collapse-btn:active {
	cursor: grabbing;
}

.sidebar-collapse-btn.dragging {
	cursor: grabbing;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* 사이드바 - 채널 */
.sidebar {
	background: var(--sidebar-bg);
	border-right: 1px solid var(--border);
	padding: 16px 0;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.sidebar::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		135deg,
		transparent 0%,
		rgba(74, 222, 128, 0.06) 25%,
		transparent 50%,
		rgba(74, 222, 128, 0.04) 75%,
		transparent 100%
	);
	background-size: 400% 400%;
	animation: sidebarWave 5s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

.sidebar > * {
	position: relative;
	z-index: 1;
}

@keyframes sidebarWave {
	0% {
		background-position: 100% 0%;
	}
	50% {
		background-position: 0% 100%;
	}
	100% {
		background-position: 100% 0%;
	}
}

.sidebar-header {
	padding: 2px 16px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 4px;
}

.logo {
	font-size: 18px;
	font-weight: 800;
	color: var(--text);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

.logo:hover {
	color: var(--accent);
}

.logo-img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	position: relative;
	top: -8px;
}

.sidebar-title {
	padding: 8px 16px 16px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.discord-link {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	background: rgba(88, 101, 242, 0.15);
	border: 1px solid rgba(88, 101, 242, 0.3);
	border-radius: 4px;
	color: #5865f2;
	font-size: 10px;
	font-weight: 600;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	transition: all 0.15s;
}

.discord-link:hover {
	background: rgba(88, 101, 242, 0.25);
	border-color: #5865f2;
}

.discord-link svg {
	flex-shrink: 0;
}

.channel-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0 8px;
}

.channel-category {
	padding: 12px 12px 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	margin-top: 8px;
	cursor: grab;
	border-radius: 4px;
	transition: background 0.15s, opacity 0.15s;
}

.channel-category:hover {
	background: var(--surface);
}

.channel-category:first-child {
	margin-top: 0;
}

.channel-category.dragging {
	opacity: 0.5;
	cursor: grabbing;
}

.channel-category.drag-over {
	background: var(--accent-dim);
	border-top: 2px solid var(--accent);
}

.channel {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.12s;
}

.channel:hover {
	background: var(--surface);
	color: var(--text);
}

.channel.active {
	background: var(--accent-dim);
	color: var(--accent);
}

.channel-icon {
	font-size: 16px;
	width: 20px;
	text-align: center;
}

.channel-count {
	margin-left: auto;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 6px;
	background: var(--surface);
	border-radius: 8px;
	color: var(--text-muted);
}

.channel.active .channel-count {
	background: var(--accent);
	color: #000;
}

/* 메인 */
.main {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* 상단 컨트롤 */
.controls {
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 12px;
	position: relative;
}

.controls::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		transparent 0%,
		rgba(74, 222, 128, 0.05) 20%,
		transparent 45%,
		rgba(74, 222, 128, 0.03) 70%,
		transparent 100%
	);
	background-size: 400% 400%;
	animation: sidebarWave 5s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

.controls > * {
	position: relative;
	z-index: 1;
	gap: 12px;
	background: var(--sidebar-bg);
	position: sticky;
	top: 0;
	z-index: 10;
}

/* 태그 */
.tags {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.tag {
	padding: 6px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.12s;
	font-family: 'Noto Sans KR', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
}

.tag:hover {
	background: var(--surface-hover);
	color: var(--text);
	border-color: #3f3f46;
}

.tag.active {
	background: var(--accent);
	border-color: var(--accent);
	color: #000;
}

/* 상태 원 (이모지 대체) */
.status-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.status-dot.green {
	background: #22c55e;
	box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.status-dot.red {
	background: #ef4444;
	box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}

.tag-add {
	background: transparent;
	border: 1px dashed var(--border);
	color: var(--text-muted);
	cursor: pointer;
	font-size: 14px;
}

.tag-add:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* 검색 행 */
.search-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* 검색 확장 버튼 - 데스크탑에서 숨김 */
.search-expand-btn {
	display: none;
}

/* 검색 추가 항목 - 데스크탑에서는 항상 표시 */
.search-extra-item {
	/* 데스크탑에서는 그대로 표시 */
}

.keyword-box {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	height: 40px;
}

.keyword-box:focus-within {
	border-color: var(--accent);
}

.keyword-input {
	flex: 1;
	background: none;
	border: none;
	color: var(--text);
	font-size: 14px;
	outline: none;
}

.keyword-input::placeholder {
	color: var(--text-muted);
}

.keyword-clear {
	width: 18px;
	height: 18px;
	background: var(--border);
	border: none;
	border-radius: 50%;
	color: var(--text-muted);
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.keyword-clear:hover {
	background: #3f3f46;
	color: var(--text);
}

/* AND/OR 토글 */
.op-toggle {
	display: flex;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	height: 40px;
}

.op-toggle.mini {
	height: 32px;
	flex-shrink: 0;
}

.op-toggle.mini .op-btn {
	padding: 0 10px;
	font-size: 11px;
}

.op-btn {
	padding: 0 14px;
	background: none;
	border: none;
	font-size: 13px;
	font-weight: 700;
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.12s;
}

.op-btn.active {
	background: var(--accent);
	color: #000;
}

/* 옵션 행 */
.options-row {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: 13px;
}

.option {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-secondary);
}

/* 공통 토글 그룹 */
.toggle-group {
	display: flex;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	height: 32px;
}

.toggle-group .toggle-item {
	padding: 0 12px;
	background: none;
	border: none;
	border-right: 1px solid var(--border);
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.12s;
	white-space: nowrap;
}

.toggle-group .toggle-item:last-child {
	border-right: none;
}

.toggle-group .toggle-item:hover {
	background: var(--surface-hover);
	color: var(--text);
}

.toggle-group .toggle-item.active {
	background: var(--accent);
	color: #000;
}

/* 이모지/크기 토글 (공통 상속) */
.emoji-toggle, .size-toggle {
	display: flex;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	height: 32px;
}

.emoji-btn, .size-btn {
	padding: 0 12px;
	background: none;
	border: none;
	border-right: 1px solid var(--border);
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.12s;
	white-space: nowrap;
}

.emoji-btn:last-child, .size-btn:last-child {
	border-right: none;
}

.emoji-btn:hover, .size-btn:hover {
	background: var(--surface-hover);
	color: var(--text);
}

.emoji-btn.active, .size-btn.active {
	background: var(--accent);
	color: #000;
}

.fade-control {
	display: flex;
	align-items: center;
	gap: 6px;
}

.fade-input {
	width: 44px;
	padding: 4px 8px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	outline: none;
}

.fade-input:focus {
	border-color: var(--accent);
}

/* 팔로우만 보기 버튼 */
.follow-filter-btn {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	transition: all 0.2s;
	color: var(--text-muted);
	white-space: nowrap;
}

.follow-filter-btn:hover {
	border-color: #facc15;
	color: #facc15;
}

.follow-filter-btn.active {
	border-color: #facc15;
	background: rgba(250, 204, 21, 0.15);
	color: #facc15;
}

.notify-btn {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.2s;
	opacity: 0.5;
}

.notify-btn:hover {
	border-color: var(--accent);
	opacity: 0.8;
}

.notify-btn.active {
	border-color: var(--accent);
	background: var(--accent-dim);
	opacity: 1;
}

.live-group {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.active-users {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-secondary);
	white-space: nowrap;
}

.active-users:empty {
	display: none;
}

.live {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--accent);
	font-weight: 600;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: background 0.2s;
}

.live:hover {
	background: var(--surface-hover);
}

.live.paused {
	color: var(--highlight);
}

.live-dot {
	width: 8px;
	height: 8px;
	background: var(--accent);
	border-radius: 50%;
	animation: pulse 1.5s infinite;
}

.pause-dot {
	width: 8px;
	height: 8px;
	background: var(--highlight);
	border-radius: 2px;
}

@keyframes pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(0.85); }
}

/* 피드 탭 */
.feed-tabs {
	display: flex;
	gap: 4px;
	padding: 8px 12px 0;
	border-bottom: 1px solid var(--border);
	background: var(--sidebar-bg);
}

.feed-tab {
	padding: 8px 16px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.15s;
	margin-bottom: -1px;
}

.feed-tab:hover {
	color: var(--text-secondary);
}

.feed-tab.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

/* 피드 */
.feed {
	flex: 1;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: var(--msg-gap, 3px);
	overflow-y: auto;
	position: relative;
}

.feed::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		transparent 0%,
		rgba(74, 222, 128, 0.04) 25%,
		transparent 50%,
		rgba(74, 222, 128, 0.03) 75%,
		transparent 100%
	);
	background-size: 400% 400%;
	animation: sidebarWave 10s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

.feed > * {
	position: relative;
	z-index: 1;
}

/* 메시지 */
.msg {
	padding: var(--msg-padding, 8px 10px);
	background: var(--surface);
	border-radius: 6px;
	border-left: 3px solid transparent;
	transition: opacity 0.2s;
	contain: content;
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.msg-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--surface-hover);
	cursor: pointer;
	transition: transform 0.1s, box-shadow 0.1s;
}

.msg-avatar:hover {
	transform: scale(1.1);
	box-shadow: 0 0 0 2px var(--accent);
}

.msg-body {
	flex: 1;
	min-width: 0;
}

.msg:hover {
	background: var(--surface-hover);
}

.msg.has-match {
	border-left-color: var(--accent);
}

.msg.faded {
	opacity: 0.35;
}

.msg.last-spot {
	border-left-color: var(--highlight);
	background: linear-gradient(90deg, rgba(250, 204, 21, 0.08) 0%, transparent 50%);
}

/* 메랜피드 불타는 테두리 효과 */
.msg.fire {
	border-left: 4px solid transparent;
	background:
		linear-gradient(var(--card), var(--card)) padding-box,
		linear-gradient(180deg, #ff0000, #ff4500, #ff8c00, #ffd700, #ff4500, #ff0000) border-box;
	background-size: 100% 100%, 100% 400%;
	animation: fireBorder 1.2s linear infinite, fireGlow 0.8s ease-in-out infinite alternate;
	box-shadow:
		0 0 6px rgba(255, 0, 0, 0.5),
		0 0 12px rgba(255, 69, 0, 0.4),
		0 0 18px rgba(255, 140, 0, 0.3);
}

.msg.fire::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, rgba(255, 69, 0, 0.12) 0%, rgba(255, 100, 0, 0.06) 40%, transparent 70%);
	pointer-events: none;
	border-radius: inherit;
}

.msg.fire .msg-content,
.msg.fire .msg-author {
	text-shadow: 0 0 3px rgba(255, 120, 0, 0.4);
}

@keyframes fireBorder {
	0% { background-position: 0 0, 0 0%; }
	100% { background-position: 0 0, 0 100%; }
}

@keyframes fireGlow {
	0% {
		box-shadow:
			0 0 6px rgba(255, 0, 0, 0.5),
			0 0 12px rgba(255, 69, 0, 0.4),
			0 0 18px rgba(255, 140, 0, 0.3);
	}
	100% {
		box-shadow:
			0 0 8px rgba(255, 50, 0, 0.6),
			0 0 16px rgba(255, 100, 0, 0.5),
			0 0 24px rgba(255, 160, 0, 0.4);
	}
}

.msg.new {
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

.msg-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: var(--msg-header-gap, 3px);
}

.msg-channel {
	font-size: var(--msg-time-size, 11px);
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-dim);
	padding: 1px 6px;
	border-radius: 3px;
}

/* 카테고리별 채널 태그 색상 */
.msg-channel.cat-hunt {
	color: #4ade80;
	background: rgba(74, 222, 128, 0.15);
}

.msg-channel.cat-boss {
	color: #f87171;
	background: rgba(248, 113, 113, 0.15);
}

.msg-channel.cat-quest {
	color: #facc15;
	background: rgba(250, 204, 21, 0.15);
}

.msg-channel.cat-guild {
	color: #a78bfa;
	background: rgba(167, 139, 250, 0.15);
}

.msg-channel.cat-trade {
	color: #38bdf8;
	background: rgba(56, 189, 248, 0.15);
}

.msg-channel.cat-etc {
	color: #a1a1aa;
	background: rgba(161, 161, 170, 0.15);
}

.msg-author {
	font-size: var(--msg-author-size, 13px);
	font-weight: 700;
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
}

.msg-author:hover {
	color: var(--accent);
	text-decoration: underline;
}

.msg-time {
	font-size: var(--msg-time-size, 11px);
	font-weight: 500;
	color: var(--text-muted);
}

.msg-time.fresh {
	color: var(--accent);
}

/* 차단 버튼 */
.msg-block-btn {
	margin-left: auto;
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s;
	padding: 4px 6px;
}

.msg:hover .msg-block-btn {
	opacity: 0.4;
}

.msg-block-btn:hover {
	opacity: 1 !important;
}

/* 팔로우 버튼 */
.msg-follow-btn {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 11px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s, background 0.15s, border-color 0.15s;
	padding: 3px 8px;
	color: var(--text-muted);
	font-weight: 500;
	white-space: nowrap;
}

.msg:hover .msg-follow-btn {
	opacity: 1;
}

.msg-follow-btn:hover {
	opacity: 1 !important;
	background: var(--surface-hover);
	border-color: var(--text-muted);
	color: var(--text);
}

.msg-follow-btn.followed {
	opacity: 1;
	background: rgba(250, 204, 21, 0.15);
	border-color: #facc15;
	color: #facc15;
}

.msg-follow-btn.followed:hover {
	background: rgba(250, 204, 21, 0.25);
}

/* 팔로우된 유저 메시지 강조 - 전체 테두리 */
.msg.followed {
	border: 1px solid rgba(250, 204, 21, 0.5);
	background: rgba(250, 204, 21, 0.06);
	box-shadow: 0 0 8px rgba(250, 204, 21, 0.1);
}

.msg.followed:hover {
	border-color: rgba(250, 204, 21, 0.7);
	background: rgba(250, 204, 21, 0.1);
}

/* 팔로우 배지 (닉네임 옆) */
.msg-followed-badge {
	font-size: 10px;
	color: #facc15;
}

/* 메시지 내용 - 줄바꿈 유지 */
.msg-content {
	font-size: var(--msg-content-size, 13px);
	line-height: var(--msg-line-height, 1.5);
	color: var(--text-secondary);
	white-space: pre-wrap;
	word-break: break-word;
}

.msg-content mark {
	background: var(--highlight-bg);
	color: var(--highlight);
	padding: 1px 4px;
	border-radius: 3px;
	font-weight: 600;
}

/* 로딩 */
.loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
	color: var(--text-muted);
}

/* 모바일 메뉴 버튼 - 데스크탑에서 숨김 */
.mobile-menu-btn {
	display: none;
}

.sidebar-overlay {
	display: none;
}

/* 스크롤바 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* 튜토리얼 툴팁 */
.tooltip {
	position: absolute;
	background: var(--surface);
	border: 1px solid var(--accent);
	border-radius: 8px;
	padding: 12px 16px;
	color: var(--text);
	font-size: 13px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	z-index: 1000;
	animation: tooltipFadeIn 0.3s ease;
	max-width: 200px;
}

.tooltip::before {
	content: '';
	position: absolute;
	top: 50%;
	right: -8px;
	transform: translateY(-50%);
	border: 8px solid transparent;
	border-left-color: var(--accent);
}

.tooltip-text {
	line-height: 1.5;
}

@keyframes tooltipFadeIn {
	from { opacity: 0; transform: translateX(10px); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes tooltipFadeOut {
	from { opacity: 1; transform: translateX(0); }
	to { opacity: 0; transform: translateX(10px); }
}

/* 컨텍스트 메뉴 (우클릭) */
.context-menu {
	position: fixed;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 4px 0;
	min-width: 160px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
	z-index: 1000;
	animation: contextFadeIn 0.15s ease;
}

@keyframes contextFadeIn {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	color: var(--text);
	font-size: 13px;
	cursor: pointer;
	transition: background 0.12s;
}

.context-menu-item:hover {
	background: var(--surface-hover);
}

.context-menu-item.danger {
	color: #f87171;
}

.context-menu-item.danger:hover {
	background: rgba(248, 113, 113, 0.15);
}

.context-menu-divider {
	height: 1px;
	background: var(--border);
	margin: 4px 0;
}

/* 사이드바 푸터 (설정 버튼) */
.sidebar-footer {
	margin-top: auto;
	padding: 12px;
	border-top: 1px solid var(--border);
}

.settings-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 10px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}

.settings-btn:hover {
	background: var(--surface-hover);
	color: var(--text);
	border-color: var(--accent);
}

.blocked-count {
	margin-left: auto;
	font-size: 11px;
	padding: 2px 6px;
	background: var(--border);
	border-radius: 8px;
	color: var(--text-muted);
}

.blocked-count:empty {
	display: none;
}

/* 설정 모달 */
.modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	z-index: 1000;
	justify-content: center;
	align-items: center;
	backdrop-filter: blur(4px);
}

.modal-overlay.show {
	display: flex;
}

.modal {
	background: var(--sidebar-bg);
	border: 1px solid var(--border);
	border-radius: 12px;
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow: hidden;
	animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
	from { opacity: 0; transform: scale(0.95) translateY(-10px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
}

.modal-header h2 {
	font-size: 16px;
	font-weight: 700;
	color: var(--text);
}

.modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--text-muted);
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

.modal-close:hover {
	color: var(--text);
}

.modal-body {
	padding: 20px;
	overflow-y: auto;
	max-height: calc(80vh - 60px);
}

.settings-section {
	margin-bottom: 24px;
}

.settings-section:last-child {
	margin-bottom: 0;
}

.settings-section h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 8px;
}

.settings-desc {
	font-size: 12px;
	color: var(--text-muted);
	margin-bottom: 12px;
}

/* 공통 유저 목록 스타일 */
.user-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}

.user-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
}

.user-list-item-name {
	font-size: 13px;
	color: var(--text);
	font-weight: 500;
}

.user-list-item-id {
	font-size: 11px;
	color: var(--text-muted);
	margin-left: 8px;
}

.user-list-action-btn {
	background: none;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 12px;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s;
}

.user-list-empty {
	text-align: center;
	padding: 20px;
	color: var(--text-muted);
	font-size: 13px;
}

/* 차단 목록 (공통 상속) */
.blocked-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}

.blocked-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
}

.blocked-item-name {
	font-size: 13px;
	color: var(--text);
	font-weight: 500;
}

.blocked-item-id {
	font-size: 11px;
	color: var(--text-muted);
	margin-left: 8px;
}

.unblock-btn {
	background: none;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 12px;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s;
}

.unblock-btn:hover {
	background: rgba(248, 113, 113, 0.15);
	border-color: #f87171;
	color: #f87171;
}

.blocked-empty {
	text-align: center;
	padding: 20px;
	color: var(--text-muted);
	font-size: 13px;
}

.settings-btn-danger {
	width: 100%;
	padding: 10px;
	background: rgba(248, 113, 113, 0.1);
	border: 1px solid rgba(248, 113, 113, 0.3);
	border-radius: 6px;
	color: #f87171;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}

.settings-btn-danger:hover {
	background: rgba(248, 113, 113, 0.2);
	border-color: #f87171;
}

.settings-btn-secondary {
	width: 100%;
	padding: 10px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}

.settings-btn-secondary:hover {
	background: var(--surface-hover);
	color: var(--text);
}

/* 팔로우 알림 토글 */
.follow-notify-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	padding: 10px 12px;
	background: var(--surface);
	border-radius: 6px;
	font-size: 13px;
	color: var(--text-secondary);
}

/* 토글 스위치 */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--border);
	transition: 0.2s;
	border-radius: 22px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: var(--text-muted);
	transition: 0.2s;
	border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
	background-color: #facc15;
}

.toggle-switch input:checked + .toggle-slider:before {
	transform: translateX(18px);
	background-color: var(--bg);
}

/* 팔로우 목록 */
.followed-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}

.followed-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	border-left: 3px solid #facc15;
}

.followed-item-name {
	font-size: 13px;
	color: var(--text);
	font-weight: 500;
}

.followed-item-id {
	font-size: 11px;
	color: var(--text-muted);
	margin-left: 8px;
}

.unfollow-btn {
	background: none;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 12px;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s;
}

.unfollow-btn:hover {
	background: rgba(250, 204, 21, 0.15);
	border-color: #facc15;
	color: #facc15;
}

.followed-empty {
	text-align: center;
	padding: 20px;
	color: var(--text-muted);
	font-size: 13px;
}

/* 팔로우/차단 카운트 배지 */
.badge-follow {
	background: rgba(250, 204, 21, 0.2);
	color: #facc15;
}

.badge-block {
	background: rgba(248, 113, 113, 0.2);
	color: #f87171;
}

/* 핫 채널 (1,2,3순위) */
.channel.hot-1 {
	border: 1px solid rgba(250, 204, 21, 0.6);
	box-shadow:
		0 0 8px rgba(250, 204, 21, 0.4),
		0 0 16px rgba(250, 204, 21, 0.2),
		inset 0 0 12px rgba(250, 204, 21, 0.1);
	animation: hotGlow1 2s ease-in-out infinite;
}

.channel.hot-2 {
	border: 1px solid rgba(251, 146, 60, 0.5);
	box-shadow:
		0 0 6px rgba(251, 146, 60, 0.35),
		0 0 12px rgba(251, 146, 60, 0.15);
	animation: hotGlow2 2.5s ease-in-out infinite;
}

.channel.hot-3 {
	border: 1px solid rgba(168, 162, 158, 0.25);
	box-shadow:
		0 0 3px rgba(168, 162, 158, 0.2),
		0 0 6px rgba(168, 162, 158, 0.08);
	animation: hotGlow3 3s ease-in-out infinite;
}

@keyframes hotGlow1 {
	0%, 100% {
		box-shadow:
			0 0 8px rgba(250, 204, 21, 0.4),
			0 0 16px rgba(250, 204, 21, 0.2),
			inset 0 0 12px rgba(250, 204, 21, 0.1);
	}
	50% {
		box-shadow:
			0 0 12px rgba(250, 204, 21, 0.6),
			0 0 24px rgba(250, 204, 21, 0.3),
			inset 0 0 16px rgba(250, 204, 21, 0.15);
	}
}

@keyframes hotGlow2 {
	0%, 100% {
		box-shadow:
			0 0 6px rgba(251, 146, 60, 0.35),
			0 0 12px rgba(251, 146, 60, 0.15);
	}
	50% {
		box-shadow:
			0 0 10px rgba(251, 146, 60, 0.5),
			0 0 18px rgba(251, 146, 60, 0.25);
	}
}

@keyframes hotGlow3 {
	0%, 100% {
		box-shadow:
			0 0 3px rgba(168, 162, 158, 0.2),
			0 0 6px rgba(168, 162, 158, 0.08);
	}
	50% {
		box-shadow:
			0 0 4px rgba(168, 162, 158, 0.28),
			0 0 8px rgba(168, 162, 158, 0.12);
	}
}

/* 파티 카드 */
.party-card {
	margin-top: 10px;
	background: var(--sidebar-bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	max-width: 35%;
}

.party-card-user-header {
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	white-space: pre-wrap;
	line-height: 1.5;
}

.party-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.party-card-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--text);
}

.party-card-count {
	font-size: 11px;
	font-weight: 600;
	color: var(--accent);
	background: var(--accent-dim);
	padding: 2px 8px;
	border-radius: 10px;
}

.party-slots {
	display: flex;
	flex-direction: column;
	gap: 1px;
	background: var(--border);
}

.party-slot {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: var(--sidebar-bg);
	transition: background 0.15s;
}

.party-slot:hover {
	background: var(--surface);
}

.party-slot.open {
	background: rgba(74, 222, 128, 0.05);
}

.party-slot.open:hover {
	background: rgba(74, 222, 128, 0.1);
}

.party-slot.filled {
	opacity: 0.7;
}

.party-slot-status {
	font-size: 14px;
	flex-shrink: 0;
}

.party-slot-position {
	font-size: 11px;
	font-weight: 600;
	color: var(--text-muted);
	background: var(--surface);
	padding: 2px 6px;
	border-radius: 3px;
	flex-shrink: 0;
}

.party-slot-info {
	flex: 1;
	font-size: 13px;
	color: var(--text-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.party-slot.open .party-slot-info {
	color: var(--accent);
	font-weight: 500;
}

.party-join-btn {
	flex-shrink: 0;
	padding: 5px 12px;
	background: var(--accent);
	border: none;
	border-radius: 4px;
	color: #000;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s;
}

.party-join-btn:hover {
	background: #22c55e;
	transform: scale(1.02);
}

.party-join-btn:active {
	transform: scale(0.98);
}

/* ========================================
   고성능 확성기 (RHK) 피드 스타일
   ======================================== */

/* 고확 탭 버튼 - 비활성 시 다른 탭과 동일, 활성화 시만 주황색 */
.feed-tab.feed-tab-rhk.active {
	background: linear-gradient(135deg, #ff6b35, #f7931e);
	color: #000;
	font-weight: 700;
	border-color: transparent;
}

/* 고확 메시지 카드 */
.rhk-msg {
	border-left: 3px solid #ff6b35;
}

.rhk-msg.has-match {
	border-left-color: var(--highlight);
}

/* 고확 아이콘 (아바타 대신) */
.rhk-icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex-shrink: 0;
	background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(247, 147, 30, 0.2));
	border-radius: 6px;
}

/* 고확 위치/채널 표시 */
.rhk-location {
	color: #ff9966 !important;
	font-weight: 500;
}

/* 고확 메시지 작성자 (캐릭터명) */
.rhk-msg .msg-author {
	color: #ffb380;
}