

		#calendarHolder {
			/* #contest-validation-hint pulls itself up by -1.8em (relative to
			   its own inherited font-size, which can be larger than this
			   contest's @contestFontSize the .formelement padding is based
			   on). A plain 20px buffer isn't always bigger than that pull, and
			   unlike text fields the calendar's dark grid has no forgiving
			   whitespace to hide the overlap in - so use a generous,
			   unit-independent floor. */
			margin-bottom: max(3em, 60px);
			padding:0 1.5em;
			display: inline-block;
			width: 100%;
		}

		.calendar-countdown {
			clear: both;
			color: inherit;
			margin: 0 auto 1.5em;
			text-align: center;
		}

		.calendar-countdown-label,
		.calendar-countdown-ended {
			margin: 0 0 0.25em;
		}

		.calendar-countdown-time {
			display: block;
			font-size: clamp(1.25rem, 3vw, 2rem);
			font-variant-numeric: tabular-nums;
			font-weight: 700;
		}

		.calendar-countdown-reload {
			color: inherit;
			font-weight: 700;
			text-decoration: underline;
		}

		/* .calendar-countdown-time sets display:block, which overrides the browser's [hidden] rule. */
		.calendar-countdown [hidden] {
			display: none;
		}

		.calendar-progress {
			clear: both;
			margin: 0 auto 1.5em;
			text-align: center;
		}

		.calendar-progress-summary {
			margin: 0 0 0.5em;
		}

		.calendar-progress-goal-reached {
			font-weight: 700;
		}

		.calendar-progress-bar {
			display: block;
			width: min(100%, 28rem);
			margin: 0 auto;
			accent-color: currentColor;
		}

		/* v4: the card already has side padding; a second inset makes the grid
		   narrower than the other elements. */
		.contest-v4 #calendarHolder {
			padding-left: 0;
			padding-right: 0;
		}
		
		.calendarItem {			
			position:relative; 
			color: #ffffff;
			float:left;			
			cursor: default;			
			-webkit-box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.5);
			-moz-box-shadow:    0px 0px 7px rgba(0, 0, 0, 0.5);
			box-shadow:         0px 0px 7px rgba(0, 0, 0, 0.5);			
		}

		.calendarItemFiller {
			cursor: default;
		}
		
		.calendarItem-valid {
			cursor:pointer;
		}
		
		.calendarItem-active {
			color: #ff0000;
		}
		
		.calendarSpecialItem {
		}
		
		.calendarItemNumber {
			font-family: 'Mountains of Christmas', 'Comic Sans', cursive;
			text-shadow: 1px 1px 4px rgba(0, 0, 0, 1);
			text-align:center; 
			-webkit-touch-callout: none;
			-webkit-user-select: none;
			-khtml-user-select: none;
			-moz-user-select: none;
			-ms-user-select: none;
			user-select: none;
		}
		
		.calendarItemContent {
			clear:both;
			display:none;
			position:relative;
			line-height:1.6;
		}

		/* disable flowing of text around image */
		.calendarItemContent div {
			/* overflow: hidden; */
		}

		.calendarContentText {
			margin-right:2em;
		}

		.calendarContentImage {
			float:right;
			margin-top:6px;
			margin-left:2em;
			margin-bottom:10px;
			-webkit-box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.5);
			-moz-box-shadow:    0px 0px 7px rgba(0, 0, 0, 0.5);
			box-shadow:         0px 0px 7px rgba(0, 0, 0, 0.5);
		}

		.calendarContentHeadline {
			margin-bottom:1rem;
		}

		.calendarParticipate {
			clear: both;
			margin-top: 1rem;
			margin-bottom: 0;
			text-align: center;
		}

		.calendarContentCoupon {
			clear: both;
			margin: 1rem 0;
			padding: 0.75rem 1rem;
			border: 1px solid currentColor;
			border-radius: 0.5rem;
		}

		.calendarContentCouponCode {
			font-size: 1.25em;
			font-weight: 700;
			letter-spacing: 0.04em;
			word-break: break-word;
		}

		.calendar-style-card .calendarItemContent-open,
		.calendar-style-card_door .calendarItemContent-open,
		.calendarItemContent-open.calendar-style-card,
		.calendarItemContent-open.calendar-style-card_door {
			position: relative;
			box-sizing: border-box;
			display: flex;
			flex-wrap: wrap;
			align-items: flex-start;
			gap: 1rem;
			margin-top: 1.5rem;
			margin-bottom: 1.5rem;
			padding: 1.5rem;
			color: inherit;
			background: color-mix(in srgb, currentColor 7%, transparent);
			border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
			border-radius: 1rem;
			box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
			animation: calendarContentReveal 280ms ease-out both;
		}

		/* The clearfix pseudo-element would be a flex item and indent the text by the gap. */
		.calendarItemContent-open:not(.calendar-style-classic)::after {
			display: none;
		}

		.calendarItemContent-open:not(.calendar-style-classic) .calendarParticipate {
			flex: 0 0 100%;
			order: 3;
		}

		.calendar-style-card .calendarContentHeadline,
		.calendar-style-card_door .calendarContentHeadline,
		.calendarContentHeadline.calendar-style-card,
		.calendarContentHeadline.calendar-style-card_door {
			flex: 0 0 100%;
			margin: 0;
		}

		.calendar-style-card .calendarContentText,
		.calendar-style-card_door .calendarContentText,
		.calendarContentText.calendar-style-card,
		.calendarContentText.calendar-style-card_door {
			flex: 1 1 12rem;
			order: 1;
			min-width: 0;
			margin: 0;
		}

		.calendar-style-card .calendarItemContent:has(.calendarContentText) .calendarContentImage,
		.calendar-style-card_door .calendarItemContent:has(.calendarContentText) .calendarContentImage,
		.calendarItemContent-open.calendar-style-card:has(.calendarContentText) .calendarContentImage,
		.calendarItemContent-open.calendar-style-card_door:has(.calendarContentText) .calendarContentImage {
			order: 2;
			float: none;
			width: auto;
			max-width: 45%;
			margin: 0;
			border-radius: 0.5rem;
		}

		.calendar-style-card .calendarItemContent:not(:has(.calendarContentText)) .calendarContentImage,
		.calendar-style-card_door .calendarItemContent:not(:has(.calendarContentText)) .calendarContentImage,
		.calendarItemContent-open.calendar-style-card:not(:has(.calendarContentText)) .calendarContentImage,
		.calendarItemContent-open.calendar-style-card_door:not(:has(.calendarContentText)) .calendarContentImage {
			float: none;
			width: 100%;
			max-width: 100%;
			margin: 0;
			border-radius: 0.5rem;
		}

		.calendar-style-card .calendarItemContent-open::before,
		.calendar-style-card_door .calendarItemContent-open::before,
		.calendarItemContent-open.calendar-style-card::before,
		.calendarItemContent-open.calendar-style-card_door::before {
			position: absolute;
			bottom: 100%;
			left: var(--calendar-arrow-x, 50%);
			width: 0;
			height: 0;
			border-right: 12px solid transparent;
			border-bottom: 12px solid color-mix(in srgb, currentColor 7%, transparent);
			border-left: 12px solid transparent;
			content: "";
			transform: translateX(-50%);
		}

		.calendar-style-popup .calendarItemContent-open,
		.calendarItemContent-open.calendar-style-popup {
			position: fixed;
			box-sizing: border-box;
			display: flex;
			flex-wrap: nowrap;
			flex-direction: column;
			align-items: stretch;
			gap: 1rem;
			inset: 0;
			z-index: 1001;
			width: min(40rem, 90vw);
			height: fit-content;
			max-height: 90vh;
			max-height: 90dvh;
			overflow-x: hidden;
			overflow-y: auto;
			overscroll-behavior: contain;
			-webkit-overflow-scrolling: touch;
			touch-action: pan-y;
			margin: auto;
			padding: 3rem 1.5rem 1.5rem;
			backdrop-filter: blur(16px);
			animation: calendarContentReveal 220ms ease-out both;
		}

		html.calendar-popup-open,
		html.calendar-popup-open body {
			overflow: hidden;
		}

		.contest-v4 .calendarItemContent-open.calendar-style-popup {
			background: color-mix(in srgb, var(--v4-surface) 88%, transparent);
		}

		.calendar-style-popup .calendarContentImage,
		.calendarContentImage.calendar-style-popup {
			order: 1;
			width: 100%;
			max-width: 100%;
			max-height: min(40vh, 20rem);
			object-fit: cover;
			border-radius: 0.5rem;
		}

		.calendar-style-popup .calendarContentHeadline,
		.calendarContentHeadline.calendar-style-popup {
			flex: 0 0 auto;
			order: 0;
			margin: 0;
		}

		.calendar-style-popup .calendarContentText,
		.calendarContentText.calendar-style-popup {
			flex: 0 0 auto;
			order: 2;
			min-width: 0;
			margin: 0;
		}

		.calendar-style-popup .calendarItemContent-open::before,
		.calendarItemContent-open.calendar-style-popup::before {
			display: none;
		}

		.calendar-style-popup.calendarBackdrop {
			position: fixed;
			inset: 0;
			z-index: 1000;
			background: rgba(0, 0, 0, 0.6);
			backdrop-filter: blur(6px);
		}

		.calendar-style-popup.calendarPopupClose {
			/* Oversized content scrolls the button away; backdrop click and Escape still close. */
			position: absolute;
			top: 0.5rem;
			right: 0.5rem;
			margin: 0;
			padding: 0.25rem 0.6rem;
			color: inherit;
			background: transparent;
			border: 0;
			border-radius: 0.5rem;
			font: inherit;
			font-size: 1.5rem;
			line-height: 1;
			cursor: pointer;
		}

		.calendar-style-card_door .calendarItem {
			transform-origin: left center;
			transition: transform 450ms ease;
		}

		.calendar-style-card_door .calendarItem-active {
			transform: perspective(600px) rotateY(-65deg);
		}

		@keyframes calendarContentReveal {
			from { opacity: 0; transform: scale(0.96); }
			to { opacity: 1; transform: scale(1); }
		}

		@media (max-width: 600px) {
			.calendar-style-card .calendarItemContent-open,
			.calendar-style-card_door .calendarItemContent-open,
			.calendarItemContent-open.calendar-style-card,
			.calendarItemContent-open.calendar-style-card_door {
				flex-direction: column;
				align-items: stretch;
			}

			.calendar-style-card .calendarItemContent:has(.calendarContentText) .calendarContentImage,
			.calendar-style-card_door .calendarItemContent:has(.calendarContentText) .calendarContentImage,
			.calendarItemContent-open.calendar-style-card:has(.calendarContentText) .calendarContentImage,
			.calendarItemContent-open.calendar-style-card_door:has(.calendarContentText) .calendarContentImage,
			.calendar-style-card .calendarContentImage,
			.calendar-style-card_door .calendarContentImage,
			.calendarContentImage.calendar-style-card,
			.calendarContentImage.calendar-style-card_door {
				order: 1;
				width: 100%;
				max-width: 100%;
				max-height: none;
			}

			.calendar-style-card .calendarContentText,
			.calendar-style-card_door .calendarContentText,
			.calendarContentText.calendar-style-card,
			.calendarContentText.calendar-style-card_door {
				order: 2;
			}
		}

		@media (prefers-reduced-motion: reduce) {
			.calendar-style-card .calendarItemContent-open,
			.calendar-style-popup .calendarItemContent-open,
			.calendarItemContent-open.calendar-style-card,
			.calendarItemContent-open.calendar-style-popup {
				animation: none;
				transition: none;
				transform: none;
			}

			.calendar-style-card_door .calendarItemContent-open,
			.calendarItemContent-open.calendar-style-card_door {
				animation: none;
				transition: none;
			}

			.calendar-style-card_door .calendarItem {
				transition: none;
			}
		}
.calendarQuiz {
	clear: both;
	margin-top: 1rem;
}

.calendarQuizQuestion {
	font-weight: 700;
}

.calendarQuizOption {
	display: block;
	margin: 0.35rem 0;
}

.calendarQuizAnswer {
	max-width: 24rem;
}

.calendarQuizWrong {
	margin-top: 0.5rem;
	color: #a2231d;
}
