.dmm-cg {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 999999;
	display: flex;
	justify-content: center;
	padding: 16px;
	pointer-events: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dmm-cg[hidden] { display: none; }

.dmm-cg__panel {
	pointer-events: auto;
	width: 100%;
	max-width: 640px;
	background: #fff;
	color: #16202e;
	border: 1px solid #d6dde6;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(15, 26, 43, .22);
	padding: 22px 24px;
}

.dmm-cg__title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 650;
}

.dmm-cg__body {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	color: #46566b;
}

.dmm-cg__cats {
	display: grid;
	gap: 8px;
	margin: 0 0 16px;
	max-height: 40vh;
	overflow-y: auto;
}

.dmm-cg__cat {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	border: 1px solid #e3e8ee;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13px;
}

.dmm-cg__cat input { margin-top: 2px; }
.dmm-cg__cat span { display: grid; gap: 2px; }
.dmm-cg__cat em { font-style: normal; color: #6b7a8d; }

.dmm-cg__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dmm-cg__btn {
	flex: 1 1 auto;
	min-width: 132px;
	padding: 11px 18px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
}

.dmm-cg__btn--primary { background: #16202e; color: #fff; }
.dmm-cg__btn--primary:hover { background: #24384f; }
.dmm-cg__btn--ghost { background: #fff; color: #16202e; border-color: #cbd5e1; }
.dmm-cg__btn--ghost:hover { background: #f3f6f9; }
.dmm-cg__btn:focus-visible { outline: 3px solid #2f6df6; outline-offset: 2px; }

.dmm-cg__link {
	display: inline-block;
	margin-top: 12px;
	font-size: 13px;
	color: #46566b;
}

.dmm-cg__always {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 9px;
	background: #f3f6f9;
	font-size: 12.5px;
	line-height: 1.5;
	color: #46566b;
}

/* Inline trigger: inherits the surrounding text so it sits in a footer or menu unnoticed. */
.dmm-cg-open--inline {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.dmm-cg-footer {
	padding: 12px 16px 20px;
	text-align: center;
	font-size: 13px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #6b7a8d;
}

.dmm-cg-open--badge {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #16202e;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(15, 26, 43, .14);
}

.dmm-cg-showing .dmm-cg-open--badge { display: none; }

.dmm-cg-embed[data-dmm-placeholder] {
	display: grid;
	gap: 10px;
	place-items: center;
	align-content: center;
	min-height: var(--dmm-embed-h, 260px);
	padding: 28px 24px;
	background: #eef1f5;
	border: 1px solid #dde3ea;
	border-radius: 10px;
	text-align: center;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dmm-cg-embed[data-dmm-placeholder] > iframe { display: none; }

.dmm-cg-embed__btn {
	padding: 10px 20px;
	border-radius: 8px;
	border: 1px solid #16202e;
	background: #16202e;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.dmm-cg-embed__btn:hover { background: #24384f; }
.dmm-cg-embed__btn:focus-visible { outline: 3px solid #2f6df6; outline-offset: 2px; }

.dmm-cg-embed__note {
	font-size: 12px;
	line-height: 1.5;
	color: #7a8698;
	max-width: 34ch;
}

@media (prefers-color-scheme: dark) {
	.dmm-cg__panel { background: #131a24; color: #e8eef6; border-color: #2a3646; }
	.dmm-cg__body { color: #a4b3c6; }
	.dmm-cg__cat { border-color: #2a3646; }
	.dmm-cg__cat em { color: #8d9db2; }
	.dmm-cg__btn--primary { background: #4c8dff; color: #05101f; }
	.dmm-cg__btn--ghost { background: transparent; color: #e8eef6; border-color: #37475c; }
	.dmm-cg__always { background: #1b2430; color: #a4b3c6; }
	.dmm-cg-open--badge { background: #131a24; color: #e8eef6; border-color: #2a3646; }
	.dmm-cg-embed[data-dmm-placeholder] { background: #101720; border-color: #2a3646; }
}
