/**
 * Kaapia Learner Dashboard — app shell
 */

body.kld-dashboard-page {
	--kld-bg: #f4f6fb;
	--kld-surface: #ffffff;
	--kld-ink: #0f172a;
	--kld-muted: #64748b;
	--kld-line: #e8edf5;
	--kld-purple: #6366f1;
	--kld-purple-deep: #4f46e5;
	--kld-sidebar: #0b1220;
	--kld-sidebar-text: #cbd5e1;
	--kld-teal: #14b8a6;
	--kld-radius: 14px;
	--kld-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
	background: var(--kld-bg) !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Kill WP admin-bar top gap above the sidebar */
html.kld-html-dashboard,
html:has(body.kld-dashboard-page) {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.kld-dashboard-page.admin-bar,
body.admin-bar.kld-dashboard-page {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.kld-blank-canvas,
body.kld-dashboard-page.kld-blank-canvas {
	margin: 0 !important;
	padding: 0 !important;
}

.kld-root {
	min-height: 100vh;
	margin: 0;
	padding: 0;
}

body.kld-dashboard-page .site-header,
body.kld-dashboard-page .site-announce,
body.kld-dashboard-page .site-footer,
body.kld-dashboard-page #wpadminbar {
	display: none !important;
}

body.kld-dashboard-page .site-main,
body.kld-dashboard-page .entry-content,
body.kld-dashboard-page .entry-header,
body.kld-dashboard-page .page-header {
	margin: 0 !important;
	padding: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

body.kld-dashboard-page .entry-header,
body.kld-dashboard-page .page .entry-title {
	display: none !important;
}

body.kld-dashboard-page .container {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.kld {
	--kld-sidebar-w: 268px;
	--kld-topbar-h: 64px;
	--kld-lixia-right: 1.25rem;
	--kld-lixia-bottom: 1.25rem;
	display: grid;
	grid-template-columns: var(--kld-sidebar-w) minmax(0, 1fr);
	min-height: 100vh;
	color: var(--kld-ink);
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	background: var(--kld-bg);
	transition: grid-template-columns 0.22s ease;
}

.kld.is-sidebar-collapsed {
	--kld-sidebar-w: 78px;
}

.kld__main-wrap {
	min-width: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding-top: var(--kld-topbar-h);
}

.kld__workspace {
	flex: 1;
	padding: 1.25rem 1.5rem 2rem;
	position: relative;
	outline: none;
	transition: opacity 0.18s ease;
}

.kld__workspace.is-loading {
	pointer-events: none;
}

.kld__workspace.is-switching {
	animation: kld-tab-in 0.16s ease;
}

@keyframes kld-tab-in {
	from {
		opacity: 0.72;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kld__workspace.is-switching {
		animation: none;
	}

	.kld__workspace.is-loading::after {
		animation: none;
	}

	.kld-lixia-fab::after {
		animation: none;
		display: none;
	}
}

.kld__workspace.is-loading::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(244, 246, 251, 0.55);
	z-index: 2;
}

.kld__workspace.is-loading::after {
	content: "";
	position: absolute;
	top: 28%;
	left: 50%;
	width: 2.35rem;
	height: 2.35rem;
	margin: -1.175rem 0 0 -1.175rem;
	border-radius: 50%;
	border: 3px solid rgba(99, 102, 241, 0.18);
	border-top-color: var(--kld-purple);
	background: transparent;
	box-shadow: none;
	animation: kld-spin 0.7s linear infinite;
	z-index: 3;
}

@keyframes kld-spin {
	to {
		transform: rotate(360deg);
	}
}

.kld__overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	z-index: 90;
}

/* Sidebar */
.kld-sidebar {
	position: sticky;
	top: 0;
	align-self: stretch;
	height: 100vh;
	max-height: 100vh;
	overflow: auto;
	background:
		radial-gradient(ellipse 120% 50% at 0% 0%, rgba(99, 102, 241, 0.18), transparent 55%),
		radial-gradient(ellipse 80% 40% at 100% 100%, rgba(20, 184, 166, 0.1), transparent 50%),
		linear-gradient(180deg, #0b1220 0%, #0f172a 55%, #111827 100%);
	color: var(--kld-sidebar-text);
	padding: 0.75rem 0.85rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	z-index: 95;
	border-right: 1px solid rgba(148, 163, 184, 0.08);
	transition: width 0.22s ease, padding 0.22s ease;
	scrollbar-width: thin;
	scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.kld-sidebar::-webkit-scrollbar {
	width: 6px;
}

.kld-sidebar::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.25);
	border-radius: 999px;
}

.kld-sidebar__brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.35rem 0.45rem 0.85rem;
	border-bottom: 1px solid rgba(148, 163, 184, 0.1);
	margin-bottom: 0.15rem;
}

.kld-sidebar__logo {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	color: #fff;
}

.kld-sidebar__logo-mark {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #14b8a6);
	font-weight: 800;
	font-size: 1.05rem;
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
	letter-spacing: -0.03em;
}

.kld-sidebar__logo-text {
	display: grid;
	gap: 0.1rem;
}

.kld-sidebar__logo-text strong {
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}

.kld-sidebar__logo-text small {
	color: #94a3b8;
	font-size: 0.72rem;
}

.kld.is-sidebar-collapsed .kld-sidebar__logo-text,
.kld.is-sidebar-collapsed .kld-sidebar__group-label,
.kld.is-sidebar-collapsed .kld-sidebar__label {
	display: none;
}

.kld.is-sidebar-collapsed .kld-sidebar {
	padding-left: 0.55rem;
	padding-right: 0.55rem;
}

.kld.is-sidebar-collapsed .kld-sidebar__link {
	justify-content: center;
	padding: 0.55rem;
}

.kld.is-sidebar-collapsed .kld-sidebar__logo {
	justify-content: center;
}

.kld.is-sidebar-collapsed .kld-sidebar__icon {
	width: 2.15rem;
	height: 2.15rem;
}

.kld.is-sidebar-collapsed .kld-sidebar__link.is-active::before {
	display: none;
}

.kld-sidebar__nav {
	display: grid;
	gap: 1.15rem;
	flex: 1;
}

.kld-sidebar__group + .kld-sidebar__group {
	padding-top: 0.15rem;
	border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.kld-sidebar__group-label {
	margin: 0.55rem 0 0.45rem 0.55rem;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #64748b;
}

.kld-sidebar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.2rem;
}

.kld-sidebar__link {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.48rem 0.55rem;
	border-radius: 12px;
	color: #94a3b8;
	text-decoration: none;
	font-size: 0.86rem;
	font-weight: 500;
	position: relative;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.kld-sidebar__link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #f8fafc;
}

.kld-sidebar__link:hover .kld-sidebar__icon {
	background: rgba(99, 102, 241, 0.18);
	color: #c7d2fe;
	border-color: rgba(165, 180, 252, 0.22);
}

.kld-sidebar__link.is-active {
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(124, 58, 237, 0.92));
	color: #fff;
	box-shadow: 0 10px 22px rgba(99, 102, 241, 0.32);
}

.kld-sidebar__link.is-active::before {
	content: "";
	position: absolute;
	left: -0.35rem;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 55%;
	border-radius: 999px;
	background: #a5b4fc;
	box-shadow: 0 0 10px rgba(165, 180, 252, 0.7);
}

.kld-sidebar__link.is-active .kld-sidebar__icon {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.kld-sidebar__icon {
	width: 2rem;
	height: 2rem;
	border-radius: 9px;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	background: rgba(148, 163, 184, 0.08);
	border: 1px solid rgba(148, 163, 184, 0.1);
	color: #94a3b8;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.kld-sidebar__icon .kld-icon {
	display: block;
	width: 1.05rem;
	height: 1.05rem;
}

.kld-sidebar__label {
	min-width: 0;
	line-height: 1.25;
}

/* Top bar — reference learner UI */
.kld-topbar {
	position: fixed;
	top: 0;
	left: var(--kld-sidebar-w);
	right: 0;
	height: var(--kld-topbar-h);
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 0 1.5rem;
	background: #fff;
	border-bottom: 1px solid #e8edf5;
	box-shadow: none;
	transition: left 0.22s ease;
}

.kld-topbar__left {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
	flex: 1 1 auto;
}

.kld-topbar__right {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex: 0 0 auto;
}

.kld-topbar__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.kld-topbar__toggle:hover {
	background: #f1f5f9;
	color: #334155;
}

.kld-topbar__toggle .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

.kld-topbar__search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	width: min(520px, 100%);
	max-width: 100%;
	height: 42px;
	padding: 0 1rem 0 0.9rem;
	border: 1px solid #d8def0;
	border-radius: 999px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kld-topbar__search:focus-within {
	border-color: #a5b4fc;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.kld-topbar__search-icon {
	color: #94a3b8;
	font-size: 18px;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.kld-topbar__search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: #0f172a;
	font: inherit;
	font-size: 0.9rem;
	line-height: 1.2;
	padding: 0;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

.kld-topbar__search input[type="search"]::placeholder {
	color: #94a3b8;
}

.kld-topbar__search input[type="search"]::-webkit-search-decoration,
.kld-topbar__search input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.kld-live-search {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: min(420px, 60vh);
	overflow: auto;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	background: #fff;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
	z-index: 90;
	padding: 0.35rem;
}

.kld-live-search__item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 0.65rem;
	align-items: center;
	padding: 0.55rem 0.6rem;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
}

.kld-live-search__item:hover,
.kld-live-search__item.is-active {
	background: #f8fafc;
}

.kld-live-search__thumb {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	overflow: hidden;
	background: #eef2ff;
	display: grid;
	place-items: center;
}

.kld-live-search__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kld-live-search__title {
	margin: 0;
	font-size: 0.86rem;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.3;
}

.kld-live-search__meta {
	margin: 0.1rem 0 0;
	font-size: 0.74rem;
	color: #64748b;
}

.kld-live-search__empty,
.kld-live-search__status {
	padding: 0.85rem 0.75rem;
	margin: 0;
	color: #64748b;
	font-size: 0.84rem;
	text-align: center;
}

.kld-topbar__actions {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.kld-topbar__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #334155;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.kld-topbar__link:hover {
	background: #f8fafc;
	color: #0f172a;
}

.kld-topbar__link-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}

.kld-topbar__link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: #64748b;
}

.kld-topbar__link:hover .dashicons {
	color: #475569;
}

.kld-topbar__count {
	position: absolute;
	top: -7px;
	right: -9px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #4338ca;
	color: #fff;
	font-size: 0.62rem;
	font-style: normal;
	font-weight: 700;
	display: grid;
	place-items: center;
	line-height: 1;
	box-shadow: 0 0 0 2px #fff;
	pointer-events: none;
}

.kld-topbar__count[hidden] {
	display: none;
}

.kld-notify {
	position: relative;
}

.kld-msg {
	position: relative;
}

.kld-msg__from {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.01em;
	margin-bottom: 0.1rem;
}

.kld-msg__badge,
.kld-notify__badge {
	background: #4338ca;
}

.kld-msg__trigger[aria-expanded="true"],
.kld-notify__trigger[aria-expanded="true"] {
	background: #f8fafc;
	color: #0f172a;
}

.kld-notify__list[hidden],
.kld-notify__empty[hidden] {
	display: none !important;
}

.kld-notify__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(380px, calc(100vw - 1.5rem));
	border-radius: 16px;
	border: 1px solid #e2e8f0;
	background: #fff;
	box-shadow:
		0 18px 50px rgba(15, 23, 42, 0.16),
		0 2px 8px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	z-index: 80;
	animation: kld-notify-in 0.18s ease;
}

@keyframes kld-notify-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.kld-notify__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.95rem 1rem 0.85rem;
	border-bottom: 1px solid #eef2f7;
	background:
		radial-gradient(ellipse 80% 120% at 0% 0%, rgba(99, 102, 241, 0.1), transparent 55%),
		#fff;
}

.kld-notify__head strong {
	display: block;
	font-size: 0.95rem;
	letter-spacing: -0.01em;
}

.kld-notify__head small {
	display: block;
	margin-top: 0.15rem;
	color: #64748b;
	font-size: 0.75rem;
}

.kld-notify__mark {
	border: 0;
	background: transparent;
	color: #4f46e5;
	font: inherit;
	font-size: 0.74rem;
	font-weight: 650;
	cursor: pointer;
	padding: 0.2rem 0;
	white-space: nowrap;
}

.kld-notify__mark:hover {
	color: #312e81;
	text-decoration: underline;
}

.kld-notify__list {
	list-style: none;
	margin: 0;
	padding: 0.35rem 0;
	max-height: min(420px, 60vh);
	overflow: auto;
}

.kld-notify__list[hidden],
.kld-notify__empty[hidden] {
	display: none !important;
}

.kld-notify__item {
	display: grid;
	grid-template-columns: 12px minmax(0, 1fr) 28px;
	gap: 0.55rem;
	align-items: start;
	padding: 0.75rem 0.7rem 0.75rem 1rem;
	border-left: 3px solid transparent;
	transition: background 0.15s ease, opacity 0.16s ease, transform 0.16s ease;
	position: relative;
}

.kld-notify__item.is-removing {
	opacity: 0;
	transform: translateX(12px);
	pointer-events: none;
}

.kld-notify__item:hover {
	background: #f8fafc;
}

.kld-notify__item.is-unread {
	background: #f8fafc;
}

.kld-notify__item.is-success {
	border-left-color: #14b8a6;
}

.kld-notify__item.is-info {
	border-left-color: #6366f1;
}

.kld-notify__item.is-warn {
	border-left-color: #f59e0b;
}

.kld-notify__dot {
	width: 8px;
	height: 8px;
	margin-top: 0.4rem;
	border-radius: 999px;
	background: #cbd5e1;
}

.kld-notify__item.is-unread .kld-notify__dot {
	background: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.kld-notify__item.is-success .kld-notify__dot {
	background: #14b8a6;
}

.kld-notify__item.is-info .kld-notify__dot {
	background: #6366f1;
}

.kld-notify__body {
	min-width: 0;
	display: grid;
	gap: 0.2rem;
}

.kld-notify__text {
	margin: 0;
	color: #0f172a;
	font-size: 0.84rem;
	line-height: 1.4;
	text-decoration: none;
	font-weight: 550;
	text-align: left;
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	font: inherit;
	font-size: 0.84rem;
	font-weight: 550;
}

a.kld-notify__text:hover,
button.kld-notify__text:hover {
	color: #4338ca;
}

.kld-notify__dismiss {
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #94a3b8;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
	margin-top: -0.1rem;
}

.kld-notify__dismiss:hover {
	background: #fee2e2;
	color: #b91c1c;
}

.kld-notify__time {
	color: #94a3b8;
	font-size: 0.72rem;
}

.kld-notify__empty {
	padding: 1.75rem 1.25rem;
	text-align: center;
	display: grid;
	justify-items: center;
	gap: 0.55rem;
}

.kld-notify__empty-icon {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: #eef2ff;
	color: #4f46e5;
}

.kld-notify__empty p {
	margin: 0;
	color: #64748b;
	font-size: 0.84rem;
	line-height: 1.45;
	max-width: 26ch;
}

.kld-notify__foot {
	padding: 0.7rem 1rem;
	border-top: 1px solid #eef2f7;
	background: #f8fafc;
	text-align: center;
}

.kld-notify__foot a {
	color: #4f46e5;
	font-size: 0.8rem;
	font-weight: 650;
	text-decoration: none;
}

.kld-notify__foot a:hover {
	text-decoration: underline;
}

.kld-user-dropdown {
	position: relative;
	margin-left: 0.35rem;
	padding-left: 0.55rem;
	border-left: 1px solid #eef2f7;
}

.kld-user-dropdown__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.2rem 0.35rem 0.2rem 0.2rem;
	border-radius: 999px;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: inherit;
	font: inherit;
}

.kld-user-dropdown__trigger:hover {
	background: #f8fafc;
}

.kld-user-dropdown__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.kld-user-dropdown__meta {
	display: grid;
	gap: 0.05rem;
	text-align: left;
	min-width: 0;
}

.kld-user-dropdown__name {
	font-size: 0.9rem;
	font-weight: 700;
	color: #0f172a;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.15;
}

.kld-user-dropdown__role {
	font-size: 0.72rem;
	font-weight: 500;
	color: #94a3b8;
	line-height: 1.15;
}

.kld-user-dropdown__chevron {
	color: #64748b;
	font-size: 16px;
	width: 16px;
	height: 16px;
	transition: transform 0.15s ease;
}

.kld-user-dropdown__trigger[aria-expanded="true"] .kld-user-dropdown__chevron {
	transform: rotate(180deg);
}

.kld-user-dropdown__menu {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 200px;
	padding: 0.4rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #e2e8f0;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
	z-index: 120;
}

.kld-user-dropdown__menu[hidden] {
	display: none !important;
}

.kld-user-dropdown__item {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	color: #334155;
	text-decoration: none;
	font-size: 0.86rem;
	font-weight: 500;
}

.kld-user-dropdown__item:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.kld-user-dropdown__item .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: #64748b;
}

/* Cart sliding drawer */
.kld-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
	backdrop-filter: blur(2px);
	z-index: 140;
	opacity: 0;
	transition: opacity 0.22s ease;
}

.kld.is-cart-open .kld-cart-overlay {
	opacity: 1;
}

.kld-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100vw);
	z-index: 150;
	pointer-events: none;
}

.kld-cart-drawer__panel {
	height: 100%;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	background: #fff;
	box-shadow: -18px 0 50px rgba(15, 23, 42, 0.18);
	transform: translateX(104%);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: auto;
}

.kld.is-cart-open .kld-cart-drawer__panel {
	transform: translateX(0);
}

.kld-cart-drawer__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.2rem 1rem;
	border-bottom: 1px solid #eef2f7;
	background:
		radial-gradient(ellipse 90% 120% at 0% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
		#fff;
}

.kld-cart-drawer__head h2 {
	margin: 0;
	font-size: 1.15rem;
	letter-spacing: -0.02em;
	color: #0f172a;
}

.kld-cart-drawer__count {
	margin: 0.2rem 0 0;
	color: #64748b;
	font-size: 0.8rem;
}

.kld-cart-drawer__close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: #f1f5f9;
	color: #475569;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.kld-cart-drawer__close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.kld-cart-drawer__body {
	overflow: auto;
	padding: 0.85rem 1rem 1rem;
}

.kld-cart-drawer__empty {
	min-height: 280px;
	display: grid;
	align-content: center;
	justify-items: center;
	text-align: center;
	gap: 0.55rem;
	padding: 1.5rem 0.75rem;
}

.kld-cart-drawer__empty-icon {
	width: 58px;
	height: 58px;
	border-radius: 18px;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, rgba(99, 102, 241, 0.16), rgba(20, 184, 166, 0.12));
	color: #4338ca;
	margin-bottom: 0.25rem;
}

.kld-cart-drawer__empty-icon .dashicons {
	font-size: 26px;
	width: 26px;
	height: 26px;
}

.kld-cart-drawer__empty strong {
	font-size: 1rem;
	color: #0f172a;
}

.kld-cart-drawer__empty p {
	margin: 0 0 0.45rem;
	color: #64748b;
	font-size: 0.86rem;
	max-width: 28ch;
	line-height: 1.45;
}

.kld-cart-drawer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.7rem;
}

.kld-cart-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 28px;
	gap: 0.75rem;
	align-items: start;
	padding: 0.75rem;
	border: 1px solid #eef2f7;
	border-radius: 14px;
	background:
		radial-gradient(ellipse 80% 100% at 0% 0%, rgba(99, 102, 241, 0.06), transparent 55%),
		#fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kld-cart-item:hover {
	border-color: #dbe3f0;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.kld-cart-item__media {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef2ff;
}

.kld-cart-item__media img,
.kld-cart-item__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kld-cart-item__ph {
	background:
		radial-gradient(ellipse 70% 80% at 30% 20%, rgba(165, 180, 252, 0.55), transparent 55%),
		linear-gradient(160deg, #312e81, #6366f1 55%, #14b8a6);
}

.kld-cart-item__body {
	min-width: 0;
	display: grid;
	gap: 0.2rem;
}

.kld-cart-item__title {
	color: #0f172a;
	font-size: 0.9rem;
	font-weight: 650;
	line-height: 1.35;
	text-decoration: none;
}

.kld-cart-item__title:hover {
	color: #4338ca;
}

.kld-cart-item__meta {
	margin: 0;
	color: #94a3b8;
	font-size: 0.76rem;
}

.kld-cart-item__price {
	color: #0f172a;
	font-size: 0.9rem;
	font-weight: 700;
}

.kld-cart-item__price .amount,
.kld-cart-item__price .woocommerce-Price-amount {
	font-weight: 700;
}

.kld-cart-item__remove {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #94a3b8;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
}

.kld-cart-item__remove:hover {
	background: #fee2e2;
	color: #b91c1c;
}

.kld-cart-drawer__foot {
	padding: 1rem 1.15rem 1.25rem;
	border-top: 1px solid #eef2f7;
	background: #f8fafc;
	display: grid;
	gap: 0.65rem;
}

.kld-cart-drawer__subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.92rem;
	color: #475569;
}

.kld-cart-drawer__subtotal strong {
	color: #0f172a;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
}

.kld-cart-drawer__note {
	margin: 0;
	color: #94a3b8;
	font-size: 0.74rem;
}

.kld-cart-drawer__actions {
	display: grid;
	gap: 0.45rem;
}

.kld-cart-drawer__checkout,
.kld-cart-drawer__view {
	justify-content: center;
	width: 100%;
	text-align: center;
}

/* Wishlist sliding drawer */
.kld-wish-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
	backdrop-filter: blur(2px);
	z-index: 140;
	opacity: 0;
	transition: opacity 0.22s ease;
}

.kld.is-wish-open .kld-wish-overlay {
	opacity: 1;
}

.kld-wish-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100vw);
	z-index: 150;
	pointer-events: none;
}

.kld-wish-drawer__panel {
	height: 100%;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	background: #fff;
	box-shadow: -18px 0 50px rgba(15, 23, 42, 0.18);
	transform: translateX(104%);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: auto;
}

.kld.is-wish-open .kld-wish-drawer__panel {
	transform: translateX(0);
}

.kld-wish-drawer__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.2rem 1rem;
	border-bottom: 1px solid #f1e4ea;
	background:
		radial-gradient(ellipse 90% 120% at 0% 0%, rgba(225, 29, 72, 0.1), transparent 55%),
		radial-gradient(ellipse 70% 90% at 100% 0%, rgba(14, 165, 233, 0.08), transparent 50%),
		#fff;
}

.kld-wish-drawer__head-copy {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	min-width: 0;
}

.kld-wish-drawer__eyebrow {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	background: linear-gradient(145deg, rgba(244, 63, 94, 0.16), rgba(14, 165, 233, 0.12));
	color: #e11d48;
}

.kld-wish-drawer__eyebrow .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.kld-wish-drawer__head h2 {
	margin: 0;
	font-size: 1.15rem;
	letter-spacing: -0.02em;
	color: #0f172a;
}

.kld-wish-drawer__count {
	margin: 0.2rem 0 0;
	color: #64748b;
	font-size: 0.8rem;
}

.kld-wish-drawer__close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: #f8fafc;
	color: #475569;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.kld-wish-drawer__close:hover {
	background: #ffe4e6;
	color: #be123c;
}

.kld-wish-drawer__body {
	overflow: auto;
	padding: 0.85rem 1rem 1rem;
}

.kld-wish-drawer__empty {
	min-height: 280px;
	display: grid;
	align-content: center;
	justify-items: center;
	text-align: center;
	gap: 0.55rem;
	padding: 1.5rem 0.75rem;
}

.kld-wish-drawer__empty-icon {
	width: 58px;
	height: 58px;
	border-radius: 18px;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, rgba(244, 63, 94, 0.16), rgba(14, 165, 233, 0.12));
	color: #e11d48;
	margin-bottom: 0.25rem;
}

.kld-wish-drawer__empty-icon .dashicons {
	font-size: 26px;
	width: 26px;
	height: 26px;
}

.kld-wish-drawer__empty strong {
	font-size: 1rem;
	color: #0f172a;
}

.kld-wish-drawer__empty p {
	margin: 0 0 0.45rem;
	color: #64748b;
	font-size: 0.86rem;
	max-width: 30ch;
	line-height: 1.45;
}

.kld-wish-drawer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.7rem;
}

.kld-wish-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 28px;
	gap: 0.75rem;
	align-items: start;
	padding: 0.75rem;
	border: 1px solid #f1e7ec;
	border-radius: 14px;
	background:
		radial-gradient(ellipse 80% 100% at 0% 0%, rgba(244, 63, 94, 0.05), transparent 55%),
		#fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.kld-wish-item:hover {
	border-color: #f0cad5;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
	transform: translateY(-1px);
}

.kld-wish-item.is-removing {
	opacity: 0;
	transform: scale(0.96) translateX(6px);
	transition: opacity 0.16s ease, transform 0.16s ease;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.kld-wish-item.is-removing {
		transition: none;
	}
}

.kld-wish-item__media {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 12px;
	overflow: hidden;
	background: #fff1f2;
}

.kld-wish-item__media img,
.kld-wish-item__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kld-wish-item__ph {
	background:
		radial-gradient(ellipse 70% 80% at 30% 20%, rgba(253, 164, 175, 0.55), transparent 55%),
		linear-gradient(160deg, #9f1239, #e11d48 55%, #0ea5e9);
}

.kld-wish-item__body {
	min-width: 0;
	display: grid;
	gap: 0.28rem;
}

.kld-wish-item__title {
	color: #0f172a;
	font-size: 0.9rem;
	font-weight: 650;
	line-height: 1.35;
	text-decoration: none;
}

.kld-wish-item__title:hover {
	color: #be123c;
}

.kld-wish-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.kld-wish-item__stock {
	display: inline-flex;
	align-items: center;
	padding: 0.12rem 0.45rem;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.kld-wish-item__stock.is-in {
	background: #ecfdf5;
	color: #047857;
}

.kld-wish-item__stock.is-out {
	background: #fff1f2;
	color: #be123c;
}

.kld-wish-item__price {
	color: #0f172a;
	font-size: 0.9rem;
	font-weight: 700;
}

.kld-wish-item__price .amount,
.kld-wish-item__price .woocommerce-Price-amount {
	font-weight: 700;
}

.kld-wish-item__actions {
	margin-top: 0.15rem;
}

.kld-wish-item__atc,
.kld-wish-item__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 0.2rem 0.7rem;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}

.kld-wish-item__atc {
	background: linear-gradient(135deg, #0f172a, #1e293b);
	color: #fff;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.kld-wish-item__atc:hover {
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
	transform: translateY(-1px);
}

.kld-wish-item__atc.is-loading,
.kld-wish-item__atc:disabled {
	opacity: 0.65;
	cursor: wait;
	transform: none;
	box-shadow: none;
}

.kld-wish-item__atc--link {
	background: #fff1f2;
	color: #be123c;
}

.kld-wish-item__atc--link:hover {
	background: #ffe4e6;
	box-shadow: none;
}

.kld-wish-item__pill {
	background: #ecfdf5;
	color: #047857;
	cursor: default;
}

.kld-wish-item__remove {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #94a3b8;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
}

.kld-wish-item__remove:hover {
	background: #fee2e2;
	color: #b91c1c;
}

.kld-wish-drawer__foot {
	padding: 1rem 1.15rem 1.25rem;
	border-top: 1px solid #f1e7ec;
	background:
		linear-gradient(180deg, #fffafb, #f8fafc);
	display: grid;
	gap: 0.65rem;
}

.kld-wish-drawer__note {
	margin: 0;
	color: #94a3b8;
	font-size: 0.74rem;
}

.kld-wish-drawer__actions {
	display: grid;
	gap: 0.45rem;
}

.kld-wish-drawer__view,
.kld-wish-drawer__shop {
	justify-content: center;
	width: 100%;
	text-align: center;
}

/* Footer */
.kld-footer {
	padding: 1.35rem 1.6rem 1.5rem;
	border-top: 1px solid #e8eef3;
	background: #f7f8fa;
}

.kld-footer__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem 1.75rem;
	align-items: center;
}

.kld-footer__item {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	min-width: 0;
	padding: 0.15rem 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.kld-footer__item:hover .kld-footer__title,
.kld-footer__item:focus-visible .kld-footer__title {
	color: var(--kld-purple);
}

.kld-footer__item:focus-visible {
	outline: 2px solid #c7d2fe;
	outline-offset: 4px;
	border-radius: 8px;
}

.kld-footer__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	color: #1e293b;
}

.kld-footer__icon .kld-icon {
	width: 22px;
	height: 22px;
	stroke-width: 1.55;
}

.kld-footer__copy {
	min-width: 0;
	display: grid;
	gap: 0.12rem;
}

.kld-footer__title {
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: #0f172a;
	line-height: 1.25;
	white-space: nowrap;
}

.kld-footer__text {
	margin: 0;
	color: #64748b;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
}

.kld-linkish {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.2rem;
	color: #4338ca;
	text-decoration: none;
	font-size: 0.82rem;
	font-weight: 700;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	width: fit-content;
	transition: color 0.15s ease, gap 0.15s ease;
}

.kld-linkish:hover {
	color: #312e81;
	gap: 0.45rem;
}

.kld-muted {
	color: var(--kld-muted);
	font-size: 0.88rem;
	margin: 0;
}

/* Lixia */
.kld-lixia {
	position: fixed;
	right: var(--kld-lixia-right);
	bottom: var(--kld-lixia-bottom);
	width: min(360px, calc(100vw - 2rem));
	height: min(560px, 70vh);
	max-height: min(70vh, 560px);
	display: none;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ddd6fe;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(79, 70, 229, 0.22);
	z-index: 60;
	overflow: hidden;
}

.kld.is-lixia-open .kld-lixia {
	display: flex;
}

.kld-lixia.is-large {
	width: min(560px, calc(100vw - 2rem));
	height: min(82vh, 720px);
	max-height: min(82vh, 720px);
}

.kld-lixia.is-resized {
	max-height: none;
}

.kld-lixia__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 1rem;
	background: linear-gradient(135deg, #6366f1, #7c3aed);
	color: #fff;
	flex-shrink: 0;
	position: relative;
}

.kld-lixia__brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
}

.kld-lixia__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
		rgba(255, 255, 255, 0.18);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.kld-lixia__brand small {
	display: block;
	opacity: 0.85;
	font-size: 0.72rem;
}

.kld-lixia__tools {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
}

.kld-lixia__tool,
.kld-lixia__close {
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.kld-lixia__close {
	font-size: 1.35rem;
	line-height: 1;
}

.kld-lixia__tool:hover,
.kld-lixia__close:hover,
.kld-lixia__tool:focus-visible,
.kld-lixia__close:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	outline: none;
}

.kld-lixia__icon-restore {
	display: none;
}

.kld-lixia.is-large .kld-lixia__icon-expand {
	display: none;
}

.kld-lixia.is-large .kld-lixia__icon-restore {
	display: block;
}

.kld-lixia__resize {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	width: 22px;
	height: 22px;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: nw-resize;
	touch-action: none;
}

.kld-lixia__resize::before {
	content: "";
	position: absolute;
	top: 7px;
	left: 7px;
	width: 8px;
	height: 8px;
	border-top: 2px solid rgba(255, 255, 255, 0.75);
	border-left: 2px solid rgba(255, 255, 255, 0.75);
	border-radius: 1px;
}

.kld-lixia__thread {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
}

.kld-lixia__hello {
	margin: 0 0 0.25rem;
	font-weight: 700;
}

.kld-lixia__intro {
	margin: 0;
	color: var(--kld-muted);
	font-size: 0.88rem;
}

.kld-lixia__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0 1rem 0.75rem;
	background: #fff;
	flex-shrink: 0;
}

.kld-lixia__actions[hidden] {
	display: none !important;
}

.kld-lixia__chip {
	border: 1px solid #e9e0ff;
	background: #f5f3ff;
	color: #4c1d95;
	border-radius: 999px;
	padding: 0.35rem 0.7rem;
	font-size: 0.75rem;
	cursor: pointer;
}

.kld-lixia__chip:hover,
.kld-lixia__chip:focus-visible {
	border-color: #c4b5fd;
	background: #ede9fe;
	outline: none;
}

.kld-lixia__msg {
	max-width: 94%;
	padding: 9px 11px;
	border-radius: 14px;
	font-size: 0.84rem;
	line-height: 1.45;
}

.kld-lixia__msg p {
	margin: 0;
	white-space: pre-wrap;
}

.kld-lixia__msg--bot {
	align-self: flex-start;
	background: #f8f7ff;
	border: 1px solid #ede9fe;
	color: var(--kld-ink);
	border-bottom-left-radius: 4px;
}

.kld-lixia__msg--user {
	align-self: flex-end;
	background: linear-gradient(135deg, #6366f1, #7c3aed);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.kld-lixia__msg--hits {
	max-width: 100%;
}

.kld-lixia__hits {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.kld-lixia__hit {
	padding: 8px 10px;
	border: 1px solid #ede9fe;
	border-radius: 12px;
	background: #faf8ff;
}

.kld-lixia__hit-src {
	display: inline-block;
	margin-bottom: 4px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #7c3aed;
}

.kld-lixia__hit p {
	margin: 0;
	white-space: normal;
}

.kld-lixia__hit mark {
	background: rgba(99, 102, 241, 0.22);
	color: inherit;
	padding: 0 1px;
	border-radius: 2px;
}

.kld-lixia__hit-jump {
	margin-top: 6px;
	border: 0;
	padding: 0;
	background: none;
	color: #7c3aed;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.kld-lixia__hit-jump:hover {
	text-decoration: underline;
}

.kld-lixia__dots {
	display: inline-flex;
	gap: 4px;
}

.kld-lixia__dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--kld-muted);
	animation: kld-lixia-dot 1s infinite ease-in-out;
}

.kld-lixia__dots span:nth-child(2) {
	animation-delay: 0.15s;
}

.kld-lixia__dots span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes kld-lixia-dot {
	0%,
	80%,
	100% {
		opacity: 0.35;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

.kld-lixia__composer {
	display: flex;
	gap: 0.45rem;
	padding: 0.85rem;
	border-top: 1px solid #ede9fe;
	flex-shrink: 0;
}

.kld-lixia__composer input {
	flex: 1;
	border: 1px solid var(--kld-line);
	border-radius: 999px;
	padding: 0.55rem 0.85rem;
	font: inherit;
}

.kld-lixia__composer input:focus {
	outline: none;
	border-color: #c4b5fd;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.kld-lixia__composer .kld-btn:disabled {
	opacity: 0.5;
	cursor: default;
	transform: none;
}

.kld-lixia-fab {
	position: fixed;
	right: var(--kld-lixia-right);
	bottom: var(--kld-lixia-bottom);
	width: auto;
	min-height: 48px;
	padding: 0 16px 0 8px;
	border: 0;
	border-radius: 999px;
	background:
		radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.32), transparent 38%),
		linear-gradient(145deg, #818cf8 0%, #6366f1 42%, #7c3aed 100%);
	color: #fff;
	font: inherit;
	box-shadow:
		0 12px 28px rgba(99, 102, 241, 0.38),
		0 0 0 3px rgba(255, 255, 255, 0.18);
	cursor: pointer;
	z-index: 55;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.kld-lixia-fab__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
	flex-shrink: 0;
}

.kld-lixia-fab__name {
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.kld-lixia-fab::after {
	content: "";
	position: absolute;
	inset: -5px;
	border-radius: 999px;
	border: 2px solid rgba(99, 102, 241, 0.32);
	animation: kld-lixia-pulse 2.6s ease-out infinite;
	pointer-events: none;
}

.kld-lixia-fab:hover,
.kld-lixia-fab:focus-visible {
	background:
		radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.46), transparent 44%),
		linear-gradient(145deg, #6366f1 0%, #4f46e5 48%, #6d28d9 100%);
	outline: none;
	transform: translateY(-1px);
}

.kld-lixia-mark {
	display: block;
	filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.18));
}

@keyframes kld-lixia-pulse {
	0% {
		transform: scale(0.92);
		opacity: 0.55;
	}
	100% {
		transform: scale(1.22);
		opacity: 0;
	}
}

.kld.is-lixia-open .kld-lixia-fab {
	display: none;
}

/* Mobile nav */
.kld-mobile-nav {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	background: #fff;
	border-top: 1px solid var(--kld-line);
	padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.15rem;
}

.kld-mobile-nav__item {
	display: grid;
	justify-items: center;
	gap: 0.15rem;
	padding: 0.4rem 0.2rem;
	border: 0;
	background: transparent;
	text-decoration: none;
	color: var(--kld-muted);
	font-size: 0.62rem;
	font-weight: 600;
	cursor: pointer;
}

.kld-mobile-nav__item.is-active {
	color: var(--kld-purple);
}

.kld-mobile-nav__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.35;
}

.kld-gate {
	min-height: 60vh;
	display: grid;
	place-items: center;
	padding: 2rem;
}

.kld-gate__card {
	max-width: 420px;
	padding: 2rem;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--kld-line);
	box-shadow: var(--kld-shadow);
	text-align: center;
	display: grid;
	gap: 0.75rem;
}

@media (max-width: 1024px) {
	.kld,
	.kld.is-sidebar-collapsed {
		--kld-sidebar-w: 0px;
		grid-template-columns: 1fr;
	}

	.kld-topbar {
		left: 0;
		padding: 0 1rem;
	}

	.kld-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		bottom: 0;
		width: min(300px, 88vw);
		transform: translateX(-105%);
		transition: transform 0.25s ease;
		z-index: 110;
	}

	.kld.is-sidebar-open .kld-sidebar {
		transform: translateX(0);
	}

	.kld.is-sidebar-collapsed .kld-sidebar__logo-text,
	.kld.is-sidebar-collapsed .kld-sidebar__group-label,
	.kld.is-sidebar-collapsed .kld-sidebar__label {
		display: initial;
	}

	.kld.is-sidebar-collapsed .kld-sidebar__logo-text {
		display: grid;
	}

	.kld.is-sidebar-collapsed .kld-sidebar__group-label {
		display: block;
	}

	.kld.is-sidebar-collapsed .kld-sidebar__link {
		justify-content: flex-start;
		padding: 0.48rem 0.55rem;
	}

	.kld.is-sidebar-collapsed .kld-sidebar__label {
		display: inline;
	}

	.kld.is-sidebar-collapsed .kld-sidebar__icon {
		width: 2rem;
		height: 2rem;
	}

	.kld {
		--kld-lixia-right: 1rem;
		--kld-lixia-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
	}

	.kld-mobile-nav {
		display: grid;
	}

	.kld-footer {
		padding-bottom: 6rem;
	}

	.kld-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 1.15rem 1.25rem;
	}

	.kld-footer__title,
	.kld-footer__text {
		white-space: normal;
	}

	.kld-user-dropdown__meta {
		display: none;
	}

	.kld-user-dropdown {
		border-left: 0;
		padding-left: 0;
		margin-left: 0;
	}

	.kld-topbar__search {
		width: min(280px, 100%);
	}
}

@media (max-width: 640px) {
	.kld__workspace {
		padding: 1rem 0.9rem 1.5rem;
	}

	.kld-topbar__actions > .kld-topbar__link[data-kld-coming-soon] {
		display: none;
	}

	.kld-topbar__search {
		height: 38px;
		padding-left: 0.7rem;
	}

	.kld-topbar__search input[type="search"] {
		font-size: 0.82rem;
	}

	.kld-topbar__search input[type="search"]::placeholder {
		font-size: 0.78rem;
	}

	.kld-notify__panel {
		right: -0.5rem;
		width: min(360px, calc(100vw - 1rem));
	}

	.kld-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}
