.dc-root,
.dc-root * {
	box-sizing: border-box;
}

.dc-root {
	--dc-accent: #57247e;
	--dc-accent-dark: #431760;
	--dc-bg: #ffffff;
	--dc-soft: #f7f4fa;
	--dc-text: #172033;
	--dc-muted: #526071;
	--dc-border: #d8dce3;
	--dc-focus: #1769e0;
	color: var(--dc-text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.dc-inline-settings,
.dc-media-placeholder {
	--dc-accent: #57247e;
	--dc-accent-dark: #431760;
	--dc-bg: #ffffff;
	--dc-soft: #f7f4fa;
	--dc-text: #172033;
	--dc-muted: #526071;
	--dc-border: #d8dce3;
	--dc-focus: #1769e0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dc-root [hidden] {
	display: none !important;
}

.dc-banner {
	position: fixed;
	z-index: 2147483000;
	right: 20px;
	bottom: 20px;
	left: 20px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(180px, 530px);
	gap: 24px;
	width: auto;
	max-width: 1180px;
	margin: 0 auto;
	padding: 22px;
	border: 1px solid var(--dc-border);
	border-radius: 16px;
	background: var(--dc-bg);
	box-shadow: 0 18px 55px rgba(17, 24, 39, 0.2);
}

.dc-banner h2,
.dc-modal h2,
.dc-category h3 {
	color: var(--dc-text);
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.dc-banner h2 {
	margin: 0 0 8px;
	font-size: clamp(20px, 1.1rem + 0.45vw, 25px);
	font-weight: 750;
	line-height: 1.25;
}

.dc-banner p {
	max-width: 730px;
	margin: 0;
	color: var(--dc-muted);
	font-size: 15px;
	line-height: 1.55;
}

.dc-banner__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-content: center;
	gap: 10px;
}

.dc-btn,
.dc-inline-settings {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--dc-accent);
	border-radius: 9px;
	background: var(--dc-bg);
	color: var(--dc-accent);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
}

.dc-btn--primary {
	background: var(--dc-accent);
	color: #ffffff;
}

.dc-btn:hover,
.dc-btn:focus-visible,
.dc-inline-settings:hover,
.dc-inline-settings:focus-visible {
	border-color: var(--dc-accent-dark);
	background: var(--dc-accent-dark);
	color: #ffffff;
}

.dc-btn:focus-visible,
.dc-icon-btn:focus-visible,
.dc-revisit:focus-visible,
.dc-switch input:focus-visible + span,
.dc-inline-settings:focus-visible,
.dc-links a:focus-visible {
	outline: 3px solid var(--dc-focus);
	outline-offset: 2px;
}

.dc-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 10px;
}

.dc-links a {
	color: var(--dc-accent);
	font-size: 13px;
	font-weight: 650;
	text-underline-offset: 3px;
}

.dc-backdrop {
	position: fixed;
	z-index: 2147483001;
	inset: 0;
	background: rgba(15, 23, 42, 0.58);
	backdrop-filter: blur(2px);
}

.dc-modal {
	position: fixed;
	z-index: 2147483002;
	top: 50%;
	left: 50%;
	width: min(720px, calc(100% - 28px));
	max-height: min(760px, calc(100vh - 36px));
	overflow: auto;
	transform: translate(-50%, -50%);
	border: 1px solid var(--dc-border);
	border-radius: 16px;
	background: var(--dc-bg);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.dc-modal__header {
	position: sticky;
	z-index: 2;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 22px;
	border-bottom: 1px solid var(--dc-border);
	background: var(--dc-bg);
}

.dc-modal__header h2 {
	margin: 0;
	font-size: 23px;
	font-weight: 750;
	line-height: 1.25;
}

.dc-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--dc-border);
	border-radius: 999px;
	background: var(--dc-bg);
	color: var(--dc-text);
	font: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.dc-categories {
	padding: 6px 22px;
}

.dc-category {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px;
	align-items: center;
	padding: 17px 0;
	border-bottom: 1px solid var(--dc-border);
}

.dc-category:last-child {
	border-bottom: 0;
}

.dc-category h3 {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.3;
}

.dc-category p {
	margin: 0;
	color: var(--dc-muted);
	font-size: 13px;
	line-height: 1.5;
}

.dc-switch {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	width: 48px;
	height: 28px;
}

.dc-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.dc-switch span[aria-hidden="true"] {
	position: absolute;
	inset: 0;
	border: 1px solid #aeb6c2;
	border-radius: 999px;
	background: #cbd1d9;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease;
}

.dc-switch span[aria-hidden="true"]::after {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
	content: "";
	transition: transform 0.18s ease;
}

.dc-switch input:checked + span {
	border-color: var(--dc-accent);
	background: var(--dc-accent);
}

.dc-switch input:checked + span::after {
	transform: translateX(20px);
}

.dc-switch input:disabled + span {
	opacity: 0.68;
	cursor: not-allowed;
}

.dc-modal__footer {
	position: sticky;
	z-index: 2;
	bottom: 0;
	padding: 16px 22px 20px;
	border-top: 1px solid var(--dc-border);
	background: var(--dc-soft);
}

.dc-modal__footer .dc-links {
	margin: 0 0 12px;
}

.dc-modal__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.dc-revisit {
	position: fixed;
	z-index: 2147482999;
	bottom: 14px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--dc-border);
	border-radius: 999px;
	background: var(--dc-bg);
	color: var(--dc-text);
	box-shadow: 0 5px 18px rgba(17, 24, 39, 0.16);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.dc-revisit:hover {
	border-color: var(--dc-accent);
	color: var(--dc-accent);
}

.dc-media-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 220px;
	padding: 24px;
	border: 1px dashed var(--dc-border);
	border-radius: 10px;
	background: var(--dc-soft);
	color: var(--dc-text);
	text-align: center;
}

.dc-media-placeholder p {
	max-width: 560px;
	margin: 0;
	color: var(--dc-muted);
	font-size: 14px;
}

.dc-modal-open {
	overflow: hidden;
}

.dc-root .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (max-width: 820px) {
	.dc-banner {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

@media (max-width: 620px) {
	.dc-banner {
		right: 10px;
		bottom: 10px;
		left: 10px;
		padding: 17px;
		border-radius: 13px;
	}

	.dc-banner__actions,
	.dc-modal__actions {
		grid-template-columns: 1fr;
	}

	.dc-modal {
		width: calc(100% - 18px);
		max-height: calc(100vh - 18px);
		border-radius: 13px;
	}

	.dc-modal__header,
	.dc-categories,
	.dc-modal__footer {
		padding-right: 16px;
		padding-left: 16px;
	}

	.dc-category {
		gap: 12px;
	}

	.dc-revisit span:last-child {
		display: none;
	}

	.dc-revisit {
		width: 42px;
		padding: 8px;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dc-root *,
	.dc-root *::before,
	.dc-root *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
