.dctc-kf {
	--dctc-kf-theme: #e65c00;
	--dctc-kf-size: 46px;
	--dctc-kf-bg: #fff;
	--dctc-kf-text: #222;
	--dctc-kf-muted: #666;
	--dctc-kf-side-w: 176px;
	--dctc-kf-tab-w: 36px;
	font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	font-size: 14px;
	line-height: 1.45;
	z-index: 99999;
	position: fixed;
	box-sizing: border-box;
	color: var(--dctc-kf-text);
}
.dctc-kf *,
.dctc-kf *::before,
.dctc-kf *::after {
	box-sizing: border-box;
}
.dctc-kf-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	fill: currentColor;
	vertical-align: middle;
	flex: 0 0 20px;
}

.dctc-kf-rb { right: 16px; bottom: 48px; }
.dctc-kf-rc { right: 0; top: 50%; }
.dctc-kf-rt { right: 0; top: 80px; }
.dctc-kf-lb { left: 16px; bottom: 48px; }
.dctc-kf-lc { left: 0; top: 50%; }
.dctc-kf-lt { left: 0; top: 80px; }

/* 侧栏：整块用 left/right 滑出，收起后布局盒跟着走，只露出竖条 */
.dctc-kf-sidebar {
	top: 50%;
	transform: translateY(-50%);
}
.dctc-kf-sidebar .dctc-kf-dock {
	display: flex;
	align-items: stretch;
}
.dctc-kf-left {
	left: calc(-1 * var(--dctc-kf-side-w));
	transition: left .28s ease;
}
.dctc-kf-left:hover,
.dctc-kf-left.is-open {
	left: 0;
}
.dctc-kf-right {
	right: calc(-1 * var(--dctc-kf-side-w));
	left: auto;
	transition: right .28s ease;
}
.dctc-kf-right .dctc-kf-dock {
	flex-direction: row-reverse;
}
.dctc-kf-right:hover,
.dctc-kf-right.is-open {
	right: 0;
}
.dctc-kf-side-panel {
	width: var(--dctc-kf-side-w);
	background: linear-gradient(#fff, #fffaf6);
	box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
	overflow: hidden;
	max-height: var(--dctc-kf-side-h, none);
	border: 1px solid rgba(230, 92, 0, .18);
}
.dctc-kf-left .dctc-kf-side-panel {
	border-left: 0;
	border-radius: 0 12px 12px 0;
}
.dctc-kf-right .dctc-kf-side-panel {
	border-right: 0;
	border-radius: 12px 0 0 12px;
}
.dctc-kf-side-head {
	background: linear-gradient(180deg, var(--dctc-kf-theme), #d45200);
	color: #fff;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	padding: 11px 10px;
	letter-spacing: .16em;
	text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.dctc-kf-side-logo {
	text-align: center;
	padding: 10px 12px 2px;
}
.dctc-kf-side-logo img {
	max-width: calc(var(--dctc-kf-side-w) - 40px);
	height: auto;
}
.dctc-kf-side-list {
	padding: 10px 10px 14px;
}
.dctc-kf-side-tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: var(--dctc-kf-tab-w);
	min-width: 0;
	flex: 0 0 var(--dctc-kf-tab-w);
	min-height: 148px;
	align-self: center;
	border: 0;
	margin: 0;
	padding: 16px 0;
	background: linear-gradient(180deg, var(--dctc-kf-theme), #d45200);
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .22em;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	box-shadow: 0 6px 18px rgba(212, 82, 0, .35);
	overflow: hidden;
	opacity: 1;
	transition: width .28s ease, flex-basis .28s ease, padding .28s ease, opacity .18s ease, min-height .28s ease, box-shadow .28s ease;
}
.dctc-kf-left .dctc-kf-side-tab {
	border-radius: 0 10px 10px 0;
}
.dctc-kf-right .dctc-kf-side-tab {
	border-radius: 10px 0 0 10px;
}
.dctc-kf-side-tab span {
	display: inline-block;
}
.dctc-kf-side-tab-arrow {
	display: block;
	width: 0;
	height: 0;
	writing-mode: horizontal-tb;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
}
.dctc-kf-left .dctc-kf-side-tab-arrow {
	border-left: 6px solid #fff;
}
.dctc-kf-right .dctc-kf-side-tab-arrow {
	border-right: 6px solid #fff;
}
.dctc-kf-left:hover .dctc-kf-side-tab-arrow,
.dctc-kf-left.is-open .dctc-kf-side-tab-arrow {
	border-left: 0;
	border-right: 6px solid #fff;
}
.dctc-kf-right:hover .dctc-kf-side-tab-arrow,
.dctc-kf-right.is-open .dctc-kf-side-tab-arrow {
	border-right: 0;
	border-left: 6px solid #fff;
}
.dctc-kf-left:hover .dctc-kf-side-tab,
.dctc-kf-left.is-open .dctc-kf-side-tab,
.dctc-kf-right:hover .dctc-kf-side-tab,
.dctc-kf-right.is-open .dctc-kf-side-tab {
	width: 0;
	flex-basis: 0;
	min-height: 0;
	padding: 0;
	opacity: 0;
	box-shadow: none;
	pointer-events: none;
}

.dctc-kf-block + .dctc-kf-block {
	margin-top: 8px;
}
.dctc-kf-sidebar .dctc-kf-block + .dctc-kf-block {
	margin-top: 6px;
}
.dctc-kf-block-title {
	font-size: 12px;
	color: var(--dctc-kf-muted);
	margin-bottom: 4px;
	padding-left: 2px;
}
.dctc-kf-box {
	border: 1px solid #ffd2bf;
	background: #fff;
	padding: 8px 10px;
	text-align: center;
	border-radius: 8px;
}
.dctc-kf-box-title {
	color: var(--dctc-kf-theme);
	font-size: 13px;
	font-weight: 700;
}
.dctc-kf-box-val {
	color: #444;
	font-size: 14px;
	font-weight: 700;
	margin-top: 2px;
}

/* 图标条 */
.dctc-kf-bar {
	width: var(--dctc-kf-size);
	box-shadow: 2px 2px 8px rgba(0, 0, 0, .25);
	border-radius: 3px;
	overflow: visible;
}
.dctc-kf-bar.dctc-kf-fillet { border-radius: 24px; }
.dctc-kf-bar.dctc-kf-fillet .dctc-kf-el:first-child { border-radius: 24px 24px 0 0; }
.dctc-kf-bar.dctc-kf-fillet .dctc-kf-el:last-child { border-radius: 0 0 24px 24px; }
.dctc-kf-el {
	position: relative;
	width: 100%;
	height: var(--dctc-kf-size);
	background: var(--dctc-kf-bg);
	transition: background-color .2s ease;
}
.dctc-kf-el:first-child { border-radius: 3px 3px 0 0; }
.dctc-kf-el:last-child { border-radius: 0 0 3px 3px; }
.dctc-kf-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	cursor: pointer;
	color: #555;
}
.dctc-kf-btn .dctc-kf-icon {
	width: 22px;
	height: 22px;
}
.dctc-kf-el:hover {
	background: var(--dctc-kf-theme);
	z-index: 2;
}
.dctc-kf-el:hover .dctc-kf-btn { color: #fff; }
.dctc-kf-pop {
	position: absolute;
	top: 50%;
	right: 100%;
	padding-right: 14px;
	opacity: 0;
	visibility: hidden;
	transform: translate(10px, -50%);
	transition: transform .25s ease, opacity .25s ease, visibility 0s .25s;
	z-index: 3;
	pointer-events: none;
}
.dctc-kf-lb .dctc-kf-pop,
.dctc-kf-lc .dctc-kf-pop,
.dctc-kf-lt .dctc-kf-pop {
	right: auto;
	left: 100%;
	padding-right: 0;
	padding-left: 14px;
	transform: translate(-10px, -50%);
}
.dctc-kf-el:hover .dctc-kf-pop {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
	transition-delay: 0s;
	pointer-events: auto;
}
.dctc-kf-pop-inner {
	position: relative;
	min-width: 180px;
	padding: 16px;
	background: var(--dctc-kf-bg);
	border-radius: 3px;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, .25);
}
.dctc-kf-pop-inner::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -6px;
	width: 12px;
	height: 12px;
	background: var(--dctc-kf-bg);
	transform: translateY(-50%) rotate(45deg);
	box-shadow: 2px -1px 4px rgba(0, 0, 0, .08);
}
.dctc-kf-lb .dctc-kf-pop-inner::after,
.dctc-kf-lc .dctc-kf-pop-inner::after,
.dctc-kf-lt .dctc-kf-pop-inner::after {
	right: auto;
	left: -6px;
	box-shadow: -1px 2px 4px rgba(0, 0, 0, .08);
}

.dctc-kf-row {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--dctc-kf-theme);
	text-decoration: none;
	padding: 6px 0;
	font-size: 14px;
	font-weight: 700;
}
.dctc-kf-row + .dctc-kf-row {
	border-top: 1px solid #f0f0f0;
}
.dctc-kf-sidebar .dctc-kf-row {
	padding: 8px 10px;
	margin: 0 0 6px;
	border: 1px solid #ffd8c4;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 0 rgba(230, 92, 0, .06);
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.dctc-kf-sidebar .dctc-kf-row + .dctc-kf-row {
	border-top: 1px solid #ffd8c4;
}
.dctc-kf-row:hover {
	color: #c44d00;
	text-decoration: none;
}
.dctc-kf-sidebar .dctc-kf-row:hover {
	background: var(--dctc-kf-theme);
	border-color: var(--dctc-kf-theme);
	color: #fff;
}
.dctc-kf-row .dctc-kf-icon { color: var(--dctc-kf-theme); }
.dctc-kf-type-wx .dctc-kf-row .dctc-kf-icon { color: #12b95e; }
.dctc-kf-type-qq .dctc-kf-row .dctc-kf-icon,
.dctc-kf-type-qq_group .dctc-kf-row .dctc-kf-icon { color: #11b7f5; }
.dctc-kf-type-telegram .dctc-kf-row .dctc-kf-icon { color: #29b6f6; }
.dctc-kf-sidebar .dctc-kf-row:hover .dctc-kf-icon,
.dctc-kf-sidebar .dctc-kf-row:hover .dctc-kf-label,
.dctc-kf-sidebar .dctc-kf-row:hover .dctc-kf-value {
	color: #fff;
}
.dctc-kf-row-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.dctc-kf-label { color: var(--dctc-kf-theme); }
.dctc-kf-value {
	word-break: break-all;
	color: #333;
	font-size: 13px;
	font-weight: 600;
}
.dctc-kf-qr { text-align: center; }
.dctc-kf-sidebar .dctc-kf-qr {
	padding: 8px 6px 4px;
	border: 1px solid #ffd8c4;
	border-radius: 8px;
	background: #fff;
}
.dctc-kf-qr img {
	display: block;
	width: 148px;
	max-width: 100%;
	height: auto;
	margin: 6px auto;
}
.dctc-kf-sidebar .dctc-kf-qr img {
	width: min(118px, calc(var(--dctc-kf-side-w) - 40px));
	border-radius: 4px;
}

/* 浮标（手机） */
.dctc-kf-buoy .dctc-kf-buoy-btn {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 14px;
	border: 0;
	border-radius: 50px;
	background: var(--dctc-kf-bg);
	box-shadow: 2px 2px 8px rgba(0, 0, 0, .25);
	cursor: pointer;
	color: var(--dctc-kf-theme);
}
.dctc-kf-buoy-btn .dctc-kf-icon {
	width: 28px;
	height: 28px;
}
.dctc-kf-buoy-text {
	display: none;
	font-size: 15px;
	color: var(--dctc-kf-text);
}
.dctc-kf-dot {
	position: absolute;
	top: 4px;
	right: 0;
	width: 8px;
	height: 8px;
	background: #e2231a;
	border-radius: 50%;
}
.dctc-kf-mask {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	z-index: 99999;
}
.dctc-kf-panel {
	position: absolute;
	right: 0;
	bottom: 70px;
	width: 340px;
	max-width: calc(100vw - 24px);
	background: var(--dctc-kf-bg);
	border-radius: 10px;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, .25);
	overflow: hidden;
	z-index: 3;
}
.dctc-kf-lb .dctc-kf-panel,
.dctc-kf-lc .dctc-kf-panel,
.dctc-kf-lt .dctc-kf-panel {
	right: auto;
	left: 0;
}
.dctc-kf-panel-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: #fff4ec;
}
.dctc-kf-avatar {
	position: relative;
	width: 42px;
	height: 42px;
	border: 1px solid #f0c4a8;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--dctc-kf-theme);
	background: #fff;
	flex: 0 0 42px;
}
.dctc-kf-online {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 8px;
	height: 8px;
	background: #4ad504;
	border: 2px solid #fff;
	border-radius: 50%;
}
.dctc-kf-head-info { flex: 1; min-width: 0; }
.dctc-kf-name { font-weight: 700; font-size: 16px; color: #333; }
.dctc-kf-text { margin-top: 2px; color: #555; font-size: 14px; }
.dctc-kf-close {
	border: 0;
	background: none;
	cursor: pointer;
	color: #999;
	padding: 4px;
}
.dctc-kf-panel-body {
	padding: 14px 18px 20px;
	max-height: 62vh;
	overflow: auto;
}
.dctc-kf-welcome {
	background: #f7f7f7;
	border-radius: 0 8px 8px 8px;
	padding: 12px 10px;
	margin-bottom: 14px;
	font-size: 15px;
}
.dctc-kf-welcome p { margin: 0 0 .6em; }
.dctc-kf-welcome p:last-child { margin: 0; }
.dctc-kf-toast {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 100001;
	background: rgba(0, 0, 0, .85);
	color: #fff;
	border-radius: 5px;
	padding: 12px 16px;
	max-width: 240px;
	text-align: center;
	font-size: 15px;
	pointer-events: none;
}

@media (max-width: 768px) {
	.dctc-kf-sidebar {
		display: none !important;
	}
	.dctc-kf-buoy.dctc-kf-open .dctc-kf-mask { display: block; }
	.dctc-kf-panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		border-radius: 12px 12px 0 0;
		z-index: 100000;
	}
	.dctc-kf-qr img { width: 160px; }
}
