.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--locked { opacity: .72; cursor: default; }
.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-reopen {
	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-reopen[hidden] { display: none; }

.dmm-cg-embed[data-dmm-placeholder] {
	position: relative;
	display: grid;
	gap: 8px;
	place-items: center;
	align-content: center;
	min-height: 220px;
	padding: 24px;
	background: #f1f4f8;
	border: 1px dashed #c3cedc;
	border-radius: 12px;
	text-align: center;
}

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

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

.dmm-cg-embed__note {
	font-size: 12px;
	color: #6b7a8d;
}

@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-reopen { background: #131a24; color: #e8eef6; border-color: #2a3646; }
	.dmm-cg-embed[data-dmm-placeholder] { background: #101720; border-color: #2a3646; }
}
