.ce-calendar {
	--ce-accent: #ac8c66;
	--ce-ink: #f2f2f2;
	--ce-muted: #b3b3b3;
	--ce-border: #2a2a2a;
	--ce-surface: #000;
	--ce-raised: #0d0d0d;
	--ce-chip: #141414;
	font-family: Raleway, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ce-ink);
	background: var(--ce-surface);
	border-radius: 14px;
	box-shadow: 0 0 0 1px #1a1a1a, 0 8px 32px rgba(0, 0, 0, 0.65);
	overflow: hidden;
	max-width: 1100px;
	margin: 1.25rem auto;
}

.ce-calendar--loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

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

.ce-calendar__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--ce-border);
	background: var(--ce-surface);
}

.ce-calendar__title {
	margin: 0;
	font-size: clamp(1.1rem, 2.5vw, 1.35rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	flex: 1;
	text-transform: capitalize;
	color: var(--ce-ink);
}

.ce-calendar__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--ce-border);
	border-radius: 999px;
	background: var(--ce-raised);
	color: var(--ce-ink);
	cursor: pointer;
	font-size: 1.2em;
	line-height: 1;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
	flex-shrink: 0;
}

.ce-calendar__nav:hover {
	background: #161616;
	border-color: var(--ce-accent);
}

.ce-calendar__nav:active {
	transform: scale(0.98);
}

.ce-calendar__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--ce-surface);
}

.ce-calendar__grid {
	min-width: 720px;
	padding: 0 0.5rem 0.75rem;
}

.ce-calendar__weekdays,
.ce-calendar__week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ce-calendar__weekdays {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--ce-surface);
	border-bottom: 1px solid var(--ce-border);
}

.ce-calendar__weekday {
	padding: 0.6rem 0.35rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ce-muted);
	text-align: center;
}

.ce-calendar__week + .ce-calendar__week {
	border-top: 1px solid var(--ce-border);
}

.ce-calendar__cell {
	min-height: 104px;
	border-left: 1px solid var(--ce-border);
	padding: 0.25rem 0.35rem 0.45rem;
	vertical-align: top;
	background: var(--ce-surface);
}

.ce-calendar__cell:last-child {
	border-right: 1px solid var(--ce-border);
}

.ce-calendar__week .ce-calendar__cell:first-child {
	border-left: 1px solid var(--ce-border);
}

.ce-calendar__cell--padding {
	background: #050505;
	min-height: 84px;
}

.ce-calendar__cell--has-events {
	background: var(--ce-raised);
}

.ce-calendar__daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.65rem;
	height: 1.65rem;
	padding: 0 0.3rem;
	margin-bottom: 0.2rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ce-muted);
	border-radius: 999px;
}

.ce-calendar__cell--has-events .ce-calendar__daynum {
	background: rgba(172, 140, 102, 0.28);
	color: var(--ce-ink);
}

.ce-calendar__chip {
	display: flex;
	align-items: flex-start;
	gap: 0.35rem;
	margin-top: 0.2rem;
	padding: 0.25rem 0.35rem;
	border-radius: 6px;
	border-left: 3px solid var(--ce-accent);
	background: var(--ce-chip);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	text-decoration: none;
	color: var(--ce-ink);
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.ce-calendar__chip:hover {
	background: #1a1a1a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.ce-calendar__chip_media {
	flex: 0 0 auto;
}

.ce-calendar__thumb {
	display: block;
	width: 28px;
	height: 28px;
	object-fit: cover;
	border-radius: 4px;
}

.ce-calendar__chip_text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.ce-calendar__chip_title {
	font-size: 0.65rem;
	font-weight: 600;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ce-calendar__chip_org {
	font-size: 0.6rem;
	color: var(--ce-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ce-calendar__agenda {
	padding: 1rem 1.1rem 1.25rem;
	border-top: 1px solid var(--ce-border);
	background: var(--ce-surface);
}

.ce-calendar__agenda_title {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--ce-ink);
}

.ce-calendar__agenda_item {
	padding: 0.75rem 0;
	border-top: 1px solid var(--ce-border);
}

.ce-calendar__agenda_item:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.ce-calendar__agenda_date {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ce-accent);
	margin: 0 0 0.35rem;
}

.ce-calendar__agenda_headline {
	width: 100%;
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

.ce-calendar__agenda_body {
	display: grid;
	grid-template-columns: minmax(0, 140px) 1fr;
	gap: 0.85rem;
	align-items: start;
	width: 100%;
}

.ce-calendar__agenda_body--text-only {
	grid-template-columns: 1fr;
}

.ce-calendar__agenda_img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	object-fit: cover;
	aspect-ratio: 4 / 3;
	border: 1px solid var(--ce-border);
}

.ce-calendar__agenda_headline a {
	color: var(--ce-ink);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s ease;
}

.ce-calendar__agenda_headline a:hover {
	border-color: var(--ce-accent);
}

.ce-calendar__meta {
	margin: 0;
	font-size: 0.85rem;
}

.ce-calendar__meta_row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.35rem 0.75rem;
	margin: 0.2rem 0;
}

.ce-calendar__meta_row dt {
	margin: 0;
	font-weight: 700;
	color: var(--ce-muted);
}

.ce-calendar__meta_row dd {
	margin: 0;
	color: var(--ce-ink);
}

.ce-calendar__meta_row--notes dd {
	font-size: 0.82rem;
	line-height: 1.45;
	color: #e0e0e0;
}

.ce-calendar__empty {
	margin: 0;
	font-size: 0.9rem;
	color: var(--ce-muted);
}

@media (max-width: 900px) {
	.ce-calendar__grid {
		min-width: 640px;
	}

	.ce-calendar__cell {
		min-height: 92px;
	}
}

@media (max-width: 640px) {
	.ce-calendar {
		margin: 0.75rem 0;
		border-radius: 10px;
	}

	.ce-calendar__toolbar {
		padding: 0.65rem 0.75rem;
	}

	.ce-calendar__agenda_body {
		grid-template-columns: 1fr;
	}

	.ce-calendar__agenda_media {
		max-width: 220px;
	}
}
