.lkc {
	--lkc-bg: var(--lance-card, #fffefb);
	--lkc-text: var(--lance-text, #11120f);
	--lkc-muted: var(--lance-muted, #5a5a5a);
	--lkc-line: rgba(var(--lance-line-rgb, 17, 18, 15), 0.14);
	--lkc-fill: rgba(var(--lance-line-rgb, 17, 18, 15), 0.06);

	--lkc-accent: #21c19e;
	--lkc-on-accent: var(--lance-on-accent, #ffffff);
	--lkc-chosen: var(--lance-text, #11120f);
	--lkc-on-chosen: var(--lance-bg, #faf9f5);
	--lkc-on: var(--lance-success, #1f6b35);
	--lkc-sans: var(--lance-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	--lkc-serif: var(--lance-serif, "Libre Baskerville", Georgia, serif);

	position: fixed;
	right: 12px;
	bottom: 12px;
	left: 12px;

	max-width: 900px;
	margin: 0 auto;

	z-index: 2147483000;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
	padding: 10px 20px 12px;
	border: 1px solid var(--lkc-line);
	border-radius: 16px;
	background: var(--lkc-bg);
	color: var(--lkc-text);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
	font: 400 12px/1.45 var(--lkc-sans);
	text-align: center;
	animation: lkc-in 0.28s ease-out;
}

.lkc[hidden] {
	display: none;
}

.lkc:focus {
	outline: none;
}

.lkc *,
.lkc *::before,
.lkc *::after {
	box-sizing: border-box;
}

.lkc :where(button, select) {
	font: inherit;
	color: inherit;
}

.lkc :focus-visible {
	outline: 2px solid var(--lkc-text);
	outline-offset: 2px;
}

.lkc__inner {
	max-width: 1120px;
	margin: 0 auto;
}

.lkc__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lkc__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 0;
}

.lkc__site {
	font-size: 11px;
	color: var(--lkc-muted);
}

.lkc__tools {
	display: flex;
	gap: 4px;
}

.lkc__tool {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--lkc-muted);
	cursor: pointer;
}

.lkc__tool:hover:not(:disabled),
.lkc__tool[aria-expanded="true"] {
	background: var(--lkc-fill);
	color: var(--lkc-text);
}

.lkc__tool:disabled {
	opacity: 0.35;
	cursor: default;
}

.lkc__tool svg {
	width: 18px;
	height: 18px;
}

.lkc__title {
	margin: 0 0 2px;
	font-family: var(--lkc-serif);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.lkc__sub {
	margin: 0 0 10px;
	color: var(--lkc-muted);
}

.lkc__choices {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.lkc__levels {
	display: flex;
	gap: 8px;
}

.lkc__level {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px 0 6px;
	border: 1px solid var(--lkc-line);
	border-radius: 999px;
	background: var(--lkc-bg);
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.lkc__level:hover:not(:disabled) {
	border-color: var(--lkc-text);
}

.lkc__level[aria-checked="true"] {
	border-color: var(--lkc-chosen);
	background: var(--lkc-chosen);
	color: var(--lkc-on-chosen);
}

.lkc__level:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.lkc__dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #b9bcc0;
}

.lkc__level--2 .lkc__dot {
	background: #d4a93c;
}

.lkc__level--3 .lkc__dot {
	background: #a59bc6;
}

.lkc__duration select {
	height: 36px;
	padding: 0 32px 0 12px;
	border: 1.5px solid var(--lkc-text);
	border-radius: 12px;
	background: var(--lkc-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 15px;
	appearance: none;
	cursor: pointer;
}

.lkc__text {
	max-width: 860px;
	margin: 8px auto 0;
	color: var(--lkc-muted);
}

.lkc__gpc {
	margin: 6px 0 0;
	font-size: 11px;
	color: var(--lkc-on);
}

.lkc__panel {
	max-width: 640px;
	margin: 10px auto 0;
	padding: 10px 14px;
	border-radius: 14px;
	background: var(--lkc-fill);
	text-align: left;
}

.lkc__panel[hidden] {
	display: none;
}

.lkc__panel-intro {
	margin: 0 0 6px;
	font-size: 11px;
	color: var(--lkc-muted);
}

.lkc__pref {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
	border-top: 1px solid var(--lkc-line);
	cursor: pointer;
}

.lkc__pref b {
	display: block;
	font-size: 12px;
}

.lkc__pref small {
	display: block;
	font-size: 11px;
	line-height: 1.4;
	color: var(--lkc-muted);
}

.lkc__pref input {
	position: relative;
	flex: none;
	width: 42px;
	height: 24px;
	margin: 0;
	border-radius: 999px;
	background: var(--lkc-line);
	appearance: none;
	cursor: pointer;
	transition: background-color 0.15s;
}

.lkc__pref input::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s;
}

.lkc__pref input:checked {
	background: var(--lkc-on);
}

.lkc__pref input:checked::after {
	transform: translateX(18px);
}

.lkc__pref input:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.lkc__record dl {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 6px 18px;
	margin: 8px 0 0;
	font-size: 11px;
}

.lkc__record dt {
	color: var(--lkc-muted);
}

.lkc__record dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.lkc__actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: end;
	gap: 16px;
	margin-top: 10px;
}

.lkc__customize {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	justify-self: start;
	padding: 4px 0;
	border: 0;
	background: none;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
}

.lkc__switch {
	position: relative;
	width: 36px;
	height: 20px;
	border: 2px solid var(--lkc-on);
	border-radius: 999px;
}

.lkc__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--lkc-on);
	transition: transform 0.15s;
}

.lkc__customize[aria-expanded="true"] .lkc__switch::after {
	transform: translateX(16px);
}

.lkc__save {
	min-width: 240px;
	height: 40px;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	background: var(--lkc-accent);
	color: var(--lkc-on-accent) !important;
	font-size: 13px !important;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.15s;
}

.lkc__save:hover {
	filter: brightness(0.92);
}

.lkc__policy {
	justify-self: end;
	padding: 4px 0;
	font-size: 12px;
	color: var(--lkc-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@keyframes lkc-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lkc {
		animation: none;
	}
}

@media (max-width: 760px) {
	.lkc {
		right: 8px;
		bottom: 8px;
		left: 8px;
		max-height: calc(100vh - 16px);
		padding: 10px 16px 12px;
		font-size: 12px;
	}

	.lkc__title {
		font-size: 13px;
	}

	.lkc__sub {
		margin-bottom: 8px;
	}

	.lkc__choices,
	.lkc__levels {
		width: 100%;
		gap: 8px;
	}

	.lkc__level {
		flex: 1 1 0;
		justify-content: center;
		gap: 6px;
		min-width: 0;
		height: 36px;
		padding: 0 8px;
		font-size: 11px;
	}

	.lkc__dot {
		width: 18px;
		height: 18px;
	}

	.lkc__duration,
	.lkc__duration select {
		width: 100%;
	}

	.lkc__duration select {
		height: 36px;
	}

	.lkc__text {
		min-height: 0;
		margin-top: 8px;
	}

	.lkc__actions {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 10px 24px;
	}

	.lkc__policy {
		justify-self: start;
	}

	.lkc__save {
		grid-column: 1 / -1;
		grid-row: 1;
		width: 100%;
		min-width: 0;
		height: 40px;
	}
}

@media print {
	.lkc {
		display: none !important;
	}
}
