.csdg-calendar,
.csdg-today,
.csdg-search {
	--csdg-accent: #7c2f37;
	--csdg-accent-strong: #5f1f28;
	--csdg-surface: #fff;
	--csdg-surface-soft: #f8f5f1;
	--csdg-border: #ded8d0;
	--csdg-text: #2f2925;
	--csdg-muted: #6f6862;
	--csdg-button-text: #fff;
	--csdg-radius: 18px;
	box-sizing: border-box;
	color: var(--csdg-text);
	font: inherit;
	max-width: 100%;
}

.csdg-calendar *,
.csdg-today *,
.csdg-search * {
	box-sizing: border-box;
}

.csdg-calendar {
	background: var(--csdg-surface);
	border: 1px solid var(--csdg-border);
	border-radius: var(--csdg-radius);
	box-shadow: 0 12px 34px rgba(47, 41, 37, 0.08);
	padding: clamp(1rem, 3vw, 2rem);
}

.csdg-search {
	background: var(--csdg-surface);
	border: 1px solid var(--csdg-border);
	border-radius: var(--csdg-radius);
	box-shadow: 0 12px 34px rgba(47, 41, 37, 0.08);
	padding: clamp(1rem, 3vw, 2rem);
}

.csdg-search__label {
	display: block;
	font-size: clamp(1.2rem, 3vw, 1.6rem);
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.csdg-search__controls {
	display: grid;
	gap: 0.65rem;
	grid-template-columns: minmax(0, 1fr) auto;
}

.csdg-search__input {
	background: var(--csdg-surface);
	border: 1px solid var(--csdg-border);
	border-radius: 999px;
	color: var(--csdg-text);
	font: inherit;
	min-height: 2.8rem;
	padding: 0.7rem 1rem;
	width: 100%;
}

.csdg-search__input:focus-visible {
	border-color: var(--csdg-accent);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--csdg-accent) 22%, transparent);
	outline: none;
}

.csdg-search__submit {
	border: 0;
	cursor: pointer;
	font: inherit;
	margin: 0;
}

.csdg-search__hint {
	color: var(--csdg-muted);
	font-size: 0.9rem;
	margin: 0.65rem 0 0;
}

.csdg-search__results:not(:empty) {
	border-top: 1px solid var(--csdg-border);
	margin-top: 1.5rem;
	padding-top: 1.5rem;
}

.csdg-search__results-title {
	font-size: 1.15rem;
	margin: 0 0 1rem;
}

.csdg-search__cards {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.csdg-search-card__dates {
	color: var(--csdg-muted);
	font-size: 0.92rem;
	margin: 0 0 0.65rem;
}

.csdg-search-card__date-link {
	color: var(--csdg-accent);
	font-weight: 600;
}

.csdg-calendar__toolbar {
	align-items: center;
	display: grid;
	grid-template-columns: 2.75rem 1fr 2.75rem;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.csdg-calendar__month {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	text-align: center;
}

.csdg-calendar__month-select,
.csdg-calendar__year-select {
	background-color: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--csdg-text);
	cursor: pointer;
	font-family: inherit;
	line-height: 1.1;
	margin: 0;
	max-width: 100%;
	text-align: center;
}

.csdg-calendar__month-select {
	font-size: clamp(1.2rem, 3vw, 1.75rem);
	font-weight: 600;
	text-transform: capitalize;
}

.csdg-calendar__year-select {
	color: var(--csdg-muted);
	font-size: clamp(0.78rem, 2vw, 0.95rem);
	font-weight: 500;
}

.csdg-calendar__month-select:hover,
.csdg-calendar__year-select:hover {
	background: var(--csdg-surface-soft);
}

.csdg-calendar__month-select:focus-visible,
.csdg-calendar__year-select:focus-visible {
	outline: 2px solid var(--csdg-accent);
	outline-offset: 2px;
}

.csdg-screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.csdg-calendar__nav {
	align-items: center;
	background: var(--csdg-surface-soft);
	border: 1px solid var(--csdg-border);
	border-radius: 999px;
	color: var(--csdg-accent);
	cursor: pointer;
	display: inline-flex;
	font-size: 1.7rem;
	height: 2.75rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 2.75rem;
}

.csdg-calendar__nav:hover,
.csdg-calendar__nav:focus-visible {
	background: var(--csdg-accent);
	color: var(--csdg-button-text);
}

.csdg-calendar__nav:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

.csdg-calendar__weekdays,
.csdg-calendar__grid {
	display: grid;
	gap: 0.35rem;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.csdg-calendar__weekdays {
	margin-bottom: 0.35rem;
}

.csdg-calendar__weekday {
	color: var(--csdg-muted);
	font-size: 0.78rem;
	font-weight: 700;
	padding: 0.35rem 0;
	text-align: center;
	text-transform: uppercase;
}

.csdg-calendar__day {
	aspect-ratio: 1;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 12px;
	color: inherit;
	cursor: pointer;
	font: inherit;
	min-height: 2.35rem;
	padding: 0.2rem;
}

.csdg-calendar__day:hover,
.csdg-calendar__day:focus-visible {
	background: var(--csdg-surface-soft);
	border-color: var(--csdg-border);
}

.csdg-calendar__day.is-today {
	border-color: var(--csdg-accent);
	font-weight: 700;
}

.csdg-calendar__day.is-selected {
	background: var(--csdg-accent);
	border-color: var(--csdg-accent);
	color: var(--csdg-button-text);
}

.csdg-calendar__result {
	border-top: 1px solid var(--csdg-border);
	margin-top: 1.5rem;
	padding-top: 1.5rem;
}

.csdg-modal[hidden] {
	display: none;
}

.csdg-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 1rem;
	position: fixed;
	z-index: 999999;
}

.csdg-modal__backdrop {
	background: rgba(24, 20, 18, 0.72);
	inset: 0;
	position: absolute;
}

.csdg-modal__dialog {
	background: var(--csdg-surface);
	border: 1px solid var(--csdg-border);
	border-radius: var(--csdg-radius);
	box-shadow: 0 24px 70px rgba(24, 20, 18, 0.28);
	max-height: min(90vh, 54rem);
	max-width: 64rem;
	overflow: auto;
	padding: clamp(1.25rem, 3vw, 2rem);
	position: relative;
	width: min(94vw, 64rem);
	z-index: 1;
}

.csdg-modal__dialog:focus {
	outline: none;
}

.csdg-modal__close {
	align-items: center;
	background: var(--csdg-surface-soft);
	border: 1px solid var(--csdg-border);
	border-radius: 999px;
	color: var(--csdg-accent);
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 1.6rem;
	height: 2.6rem;
	justify-content: center;
	line-height: 1;
	margin-left: auto;
	padding: 0;
	width: 2.6rem;
}

.csdg-modal__close:hover,
.csdg-modal__close:focus-visible {
	background: var(--csdg-accent);
	color: var(--csdg-button-text);
}

.csdg-calendar__result--modal {
	border-top: 0;
	margin-top: 0;
	padding-top: 0.5rem;
}

body.csdg-modal-open {
	overflow: hidden;
}

.csdg-calendar__date {
	color: var(--csdg-accent);
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	margin: 0 0 0.4rem;
	text-transform: uppercase;
}

.csdg-saint-card__excerpt {
	color: var(--csdg-muted);
}

.csdg-calendar__saints {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin: 1.25rem 0;
}

.csdg-saint-card {
	background: var(--csdg-surface-soft);
	border: 1px solid var(--csdg-border);
	border-radius: var(--csdg-radius);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.csdg-saint-card {
	color: inherit;
	display: block;
	text-decoration: none;
}

a.csdg-saint-card:hover {
	border-color: var(--csdg-accent);
	box-shadow: 0 4px 12px rgba(47, 41, 37, 0.08);
	transform: translateY(-2px);
}

a.csdg-saint-card:focus-visible {
	border-color: var(--csdg-accent);
	outline: 3px solid var(--csdg-accent);
	outline-offset: 2px;
}

.csdg-saint-card__header {
	align-items: center;
	background: var(--csdg-surface);
	border-bottom: 1px solid var(--csdg-border);
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	padding: 1rem;
}

.csdg-saint-card__body {
	padding: 1rem;
}

.csdg-saint-card__title {
	color: var(--csdg-accent-strong);
	font-size: 1.08rem;
	font-weight: 700;
	margin: 0;
}

.csdg-saint-card__chevron {
	color: var(--csdg-accent);
	flex-shrink: 0;
	height: 1.25rem;
	transition: transform 0.2s ease;
	width: 1.25rem;
}

a.csdg-saint-card:hover .csdg-saint-card__chevron {
	transform: translateX(4px);
}


.csdg-saint-card__meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 0.7rem;
}

.csdg-saint-country,
.csdg-saint-type {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.78rem;
	font-weight: 700;
	gap: 0.35rem;
	line-height: 1.2;
	padding: 0.3rem 0.55rem;
}

.csdg-saint-country {
	background: var(--csdg-surface);
	border: 1px solid var(--csdg-border);
	color: var(--csdg-text);
}

.csdg-saint-country__flag {
	border: 1px solid rgba(0, 0, 0, 0.14);
	display: block;
	height: 0.9rem;
	object-fit: cover;
	width: 1.2rem;
}

.csdg-saint-type {
	background: #efe4c3;
	color: #5e4300;
}

.csdg-saint-type--blessed {
	background: #dcecf7;
	color: #174f73;
}

.csdg-saint-type--venerable {
	background: #eadff1;
	color: #56356b;
}

.csdg-saint-type--servant_of_god {
	background: #dff0e5;
	color: #235c38;
}

.csdg-saint-type--other {
	background: #e7e7e7;
	color: #3f3f3f;
}

.csdg-saint-type__icon {
	font-size: 0.9em;
	line-height: 1;
}

.csdg-button {
	border-radius: 999px;
	display: inline-block;
	font-weight: 700;
	line-height: 1.2;
	margin-top: 0.5rem;
	padding: 0.72rem 1rem;
	text-decoration: none;
}

.csdg-button--primary {
	background: var(--csdg-accent);
	color: var(--csdg-button-text);
}

.csdg-button--primary:hover,
.csdg-button--primary:focus-visible {
	background: var(--csdg-accent-strong);
	color: var(--csdg-button-text);
}

.csdg-button--secondary {
	border: 1px solid var(--csdg-accent);
	color: var(--csdg-accent);
}

.csdg-calendar--columns-1 .csdg-calendar__saints,
.csdg-today--columns-1 .csdg-calendar__saints {
	grid-template-columns: minmax(0, 1fr);
}

.csdg-calendar--columns-2 .csdg-calendar__saints,
.csdg-today--columns-2 .csdg-calendar__saints {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.csdg-calendar--columns-3 .csdg-calendar__saints,
.csdg-today--columns-3 .csdg-calendar__saints {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.csdg-calendar--columns-4 .csdg-calendar__saints,
.csdg-today--columns-4 .csdg-calendar__saints {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.csdg-calendar--compatta {
	padding: 1rem;
}

.csdg-calendar--compatta .csdg-calendar__saints,
.csdg-today--compatta .csdg-calendar__saints {
	grid-template-columns: 1fr;
}

.csdg-calendar__error {
	color: #9e1f2f;
}

@media (max-width: 900px) {
	.csdg-calendar--columns-3 .csdg-calendar__saints,
	.csdg-calendar--columns-4 .csdg-calendar__saints,
	.csdg-today--columns-3 .csdg-calendar__saints,
	.csdg-today--columns-4 .csdg-calendar__saints {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.csdg-calendar {
		padding: 0.85rem;
	}

	.csdg-search {
		padding: 1rem;
	}

	.csdg-search__controls {
		grid-template-columns: minmax(0, 1fr);
	}

	.csdg-search__submit {
		width: 100%;
	}

	.csdg-search__cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.csdg-calendar__saints {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.csdg-modal {
		align-items: flex-end;
		padding: 0;
	}

	.csdg-modal__dialog {
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		max-height: 92vh;
		padding: 1rem;
		width: 100%;
	}

	.csdg-calendar__weekdays,
	.csdg-calendar__grid {
		gap: 0.15rem;
	}

	.csdg-calendar__day {
		border-radius: 8px;
		min-height: 2rem;
	}

	.csdg-calendar__weekday {
		font-size: 0.67rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.csdg-calendar *,
	.csdg-today *,
	.csdg-search * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
