.dctc-kf {
	--dctc-kf-theme: #e65c00;
	--dctc-kf-fg: #fff;
	--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: visible;
	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: var(--dctc-kf-theme);
	color: var(--dctc-kf-fg, #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: var(--dctc-kf-theme);
	color: var(--dctc-kf-fg, #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 var(--dctc-kf-fg, #fff);
}
.dctc-kf-right .dctc-kf-side-tab-arrow {
	border-right: 6px solid var(--dctc-kf-fg, #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 var(--dctc-kf-fg, #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 var(--dctc-kf-fg, #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-accent, 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: var(--dctc-kf-fg, #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-accent, var(--dctc-kf-theme));
	text-decoration: none;
	padding: 6px 0;
	font-size: 14px;
	font-weight: 700;
}
.dctc-kf-entry {
	display: block;
}
.dctc-kf-entry + .dctc-kf-entry,
.dctc-kf-entry + .dctc-kf-row,
.dctc-kf-row + .dctc-kf-entry {
	margin-top: 6px;
}
.dctc-kf-entry .dctc-kf-row {
	margin-bottom: 0;
}
.dctc-kf-entry .dctc-kf-qr {
	margin-top: 4px;
}
.dctc-kf-copy {
	cursor: pointer;
}
.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-hover-bg, var(--dctc-kf-theme));
	border-color: var(--dctc-kf-hover-bg, var(--dctc-kf-theme));
	color: var(--dctc-kf-hover-fg, var(--dctc-kf-fg, #fff));
}
.dctc-kf-row .dctc-kf-icon { color: var(--dctc-kf-accent, 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: var(--dctc-kf-hover-fg, var(--dctc-kf-fg, #fff));
}
.dctc-kf-row-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.dctc-kf-label { color: var(--dctc-kf-accent, var(--dctc-kf-theme)); }
.dctc-kf-value {
	word-break: break-all;
	color: #333;
	font-size: 13px;
	font-weight: 600;
}
.dctc-kf-has-hover {
	position: relative;
	cursor: pointer;
}
.dctc-kf-hover-pop {
	position: absolute;
	left: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	padding: 8px;
	background: #fff;
	border: 1px solid #ffd8c4;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, visibility .18s ease;
}
.dctc-kf-right .dctc-kf-hover-pop,
.dctc-kf-rb .dctc-kf-hover-pop,
.dctc-kf-rc .dctc-kf-hover-pop,
.dctc-kf-rt .dctc-kf-hover-pop {
	left: auto;
	right: calc(100% + 10px);
}
.dctc-kf-has-hover:hover .dctc-kf-hover-pop,
.dctc-kf-has-hover.is-hover-open .dctc-kf-hover-pop {
	opacity: 1;
	visibility: visible;
}
.dctc-kf-hover-pop img {
	display: block;
	width: 140px;
	max-width: 42vw;
	height: auto;
}
.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-accent, 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: visible;
	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-accent, 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: visible;
}
.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: 100010;
	background: rgba(0, 0, 0, .85);
	color: #fff;
	border-radius: 5px;
	padding: 12px 16px;
	max-width: 280px;
	text-align: center;
	font-size: 15px;
	pointer-events: none;
}

/* 小屏底部快捷栏：独立于侧栏，避免被 position:fixed 的客服盒带着走 */
#dctc-kf-sheet.dctc-kf {
	position: fixed;
	inset: 0;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	width: auto;
	height: auto;
	z-index: 100000;
	pointer-events: none !important;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}
#dctc-kf-sheet .dctc-kf-mask,
#dctc-kf-sheet .dctc-kf-panel {
	pointer-events: auto !important;
}

.dctc-kf-dockbar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100002;
	height: calc(var(--dctc-kf-dock-h, 52px) + env(safe-area-inset-bottom, 0px));
	padding: 0 2px env(safe-area-inset-bottom, 0px);
	background: var(--dctc-kf-dock-bg, var(--dctc-kf-theme, #e65c00));
	color: var(--dctc-kf-dock-fg, #fff);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .18);
	align-items: stretch;
	justify-content: space-around;
}

.dctc-kf-dockbar .dctc-kf-dock-btn,
.dctc-kf-dockbar a.dctc-kf-dock-btn,
.dctc-kf-dockbar button.dctc-kf-dock-btn {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 0 !important;
	margin: 0;
	padding: 6px 4px 4px;
	background: transparent !important;
	color: inherit !important;
	text-decoration: none !important;
	font-size: 11px;
	line-height: 1.2;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	/* 主题全局 a/button 会套到这里。点击过程中不能被临时关掉，否则手机端抬手时点不到。 */
	pointer-events: auto !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	outline: none;
	border-radius: 0;
	box-shadow: none !important;
	text-shadow: none !important;
	transform: none;
	opacity: 1;
}
.dctc-kf-dockbar .dctc-kf-dock-btn:link,
.dctc-kf-dockbar .dctc-kf-dock-btn:visited,
.dctc-kf-dockbar .dctc-kf-dock-btn:hover,
.dctc-kf-dockbar .dctc-kf-dock-btn:focus,
.dctc-kf-dockbar .dctc-kf-dock-btn:active,
.dctc-kf-dockbar button.dctc-kf-dock-btn:hover,
.dctc-kf-dockbar button.dctc-kf-dock-btn:focus,
.dctc-kf-dockbar button.dctc-kf-dock-btn:active {
	color: inherit !important;
	text-decoration: none !important;
	background: transparent !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	opacity: 1;
	transform: none;
}
.dctc-kf-dock-btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, .55);
	outline-offset: -3px;
}
/* 仅 JS 短按，按完立刻去掉，避免主题 button:hover 粘在上一个按钮上 */
.dctc-kf-dockbar .dctc-kf-dock-btn.is-pressing {
	background: var(--dctc-kf-dock-press, rgba(0, 0, 0, .16)) !important;
}
.dctc-kf-dock-btn .dctc-kf-icon {
	width: 22px;
	height: 22px;
	fill: currentColor;
}
.dctc-kf-dock-btn .dctc-kf-icon-img {
	display: block;
	width: 22px;
	height: 22px;
	object-fit: contain;
}
.dctc-kf-dock-btn span {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dctc-kf-dock-icon-only {
	gap: 0;
	padding: 4px;
}
.dctc-kf-dock-icon-only .dctc-kf-icon,
.dctc-kf-dock-icon-only .dctc-kf-icon-img {
	width: min(40px, calc(var(--dctc-kf-dock-h, 52px) * .62));
	height: min(40px, calc(var(--dctc-kf-dock-h, 52px) * .62));
}
.dctc-kf-dock-more[aria-expanded="true"] {
	background: rgba(0, 0, 0, .16);
}

.dctc-kf-qrbox {
	position: fixed;
	inset: 0;
	z-index: 100003;
}
.dctc-kf-qrbox-mask {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}
.dctc-kf-qrbox-panel {
	position: absolute;
	left: 50%;
	top: 46%;
	transform: translate(-50%, -50%);
	width: min(86vw, 320px);
	background: #fff;
	border-radius: 12px;
	padding: 22px 18px 18px;
	text-align: center;
	box-shadow: 0 10px 32px rgba(0, 0, 0, .28);
}
.dctc-kf-qrbox-close {
	position: absolute;
	top: 4px;
	right: 8px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	padding: 4px 8px;
}
.dctc-kf-qrbox-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 10px;
	color: #1d2327;
}
.dctc-kf-qrbox-img {
	display: block;
	width: 200px;
	max-width: 70vw;
	height: auto;
	margin: 0 auto 10px;
}
.dctc-kf-qrbox-hint {
	margin: 0 0 12px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}
.dctc-kf-qrbox-copy {
	display: inline-block;
	border: 0;
	border-radius: 6px;
	background: var(--dctc-kf-theme, #e65c00);
	color: var(--dctc-kf-fg, #fff);
	padding: 8px 16px;
	font-size: 14px;
	cursor: pointer;
}
.dctc-kf-qrbox-copy[hidden] {
	display: none;
}

@media (max-width: 768px) {
	.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;
	}
	body.dctc-kf-dock-mobile .dctc-kf-panel,
	body.dctc-kf-dock-desktop .dctc-kf-panel {
		bottom: calc(var(--dctc-kf-dock-h, 52px) + env(safe-area-inset-bottom, 0px));
		z-index: 100001;
	}
	.dctc-kf-qr img { width: 160px; }
}
