@import "https://unpkg.com/open-props";

@property --door-number {
	syntax: "<integer>";
	initial-value: 0;
	inherits: true;
}

@keyframes arrow {
	0% {
		transform: translateX(-0.1em);
	}
	50% {
		transform: translateX(0.1em);
	}
	100% {
		transform: translateX(-0.1em);
	}
}

:root {
	interpolate-size: allow-keywords;
}

@supports (view-transition-name: none) {
	::view-transition-group(*) {
	  z-index: 100;
	  animation-duration: 600ms;
	  animation-timing-function: ease-out;
	}
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	font-family: system-ui, sans-serif;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #002c1d;
	background-size: 300px 300px;
	background-blend-mode: color-dodge;
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="1500" version="1.0" viewBox="0 0 1125 1125"><defs><clipPath id="d"><path d="M0 0h1125v1125H0Zm0 0"/></clipPath><clipPath id="c"><path d="M0 0h1125v1125H0z"/></clipPath><filter id="a" width="100%" height="100%" x="0%" y="0%"><feColorMatrix color-interpolation-filters="sRGB" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><mask id="b"><g filter="url(%23a)"><path fill-opacity=".1" d="M-112-112h1350v1350H-112z"/></g></mask></defs><g mask="url(%23b)"><g clip-path="url(%23c)"><g clip-path="url(%23d)"><path fill="%23fefefe" fill-rule="evenodd" d="M161 89v18l11 11v-18l-11-11Zm563 562v19l11 11v-18Zm387 302h11l-19 27 16 1-17 32h23v-79l-14 19Zm-39 2h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 44v-19l-11-11v18Zm-25 0v-19l11-11v18Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm-336 43h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-17l-11 11Zm0-24h17l11 11h-17l-11-11Zm44 44v-19l-11-11v18Zm-25 0v-19l11-11v18Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm242 79h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 44v-19l-11-11v18Zm-25 0v-19l11-11v18Zm25-63v19l-11 11v-19l11-11Zm-25 0v19l11 11v-19l-11-11Zm98 52 11-1-19 28 16 1-17 31-1 1h27v9a218 218 0 0 0 17 0v-5l-1-4h24v-1h-1l-16-31 15-1-19-28 11 1-23-33Zm-215 0 10-1-18 28 15 1-17 31v1h26l1 9a218 218 0 0 0 16 0v-9h23v-1l-17-31 15-1-18-28 10 1-23-33Zm-166 13h2l1 10a217 217 0 0 0 16 0v-10h23l-17-32 15-1-18-27h10l-23-33-9 14-14 19h10l-18 27 15 1-17 32h24Zm3 10Zm480 102-14-20-15 20Zm-184 0-15-20-14 20Zm-210 0-11-15-11 15Zm339-430h-17l-10-11h17l10 11Zm0-24h-17l-10 11h17l10-11Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-18l-11-12v19l11 11Zm-25 0v-18l11-12v19l-11 11Zm25-63v19l-11 11v-18Zm-25 0v19l11 11v-18Zm165 148h13v-11h-3l-10 11Zm0-24h13v11h-3l-10-11Zm-154 34h10l-18 27 15 1-17 32h26l1 10a210 210 0 0 0 16 0v-10h23l-17-32 15-1-18-27h10l-23-32Zm-68-10h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 44v-19l-11-11v19Zm-25 0v-19l11-11v19Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm162-181 11-1-19 28 16 1-17 31v1h-1 27v9a218 218 0 0 0 17 0v-5l-1-4h24l-1-1-17-31 16-1-19-28 11 1-9-12h-29l-9 12Zm-184 0 11-1-19 28 16 1-17 31v1h-1 27v9a217 217 0 0 0 17 0v-2l-1-3v-4h24-1v-1l-17-31 16-1-19-28 11 1-9-12h-29l-9 12Zm-206 5h10l-18 27 15 1-17 32h26l1 10a217 217 0 0 0 16 0v-10h23l-17-32 15-1-18-27h10l-12-18h-22Zm85 229h11l-19 27 16 1-17 32h-1 27v10a210 210 0 0 0 17 0v-6l-1-4h24-1l-16-32 15-1-19-27h11l-23-32-24 32Zm-91-10h-17l-10-11h17l10 11Zm0-24h-17l-10 11h17l10-11Zm-49 24h3l11-11h-18l-10 11Zm0-24h3l11 11h-18l-10-11Zm30 44v-19l-11-11v19l11 11Zm-25 0v-19l11-11v19l-11 11Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm200-61h-17l-11-11h17Zm0-24h-17l-11 11h17Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-19l-11-11v19Zm-25 0v-19l11-11v19Zm25-63v19l-11 11v-18Zm-588 0v19l11 11v-18Zm348 304h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 44v-19l-11-11v18Zm-25 0v-19l11-11v18Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm-335 43h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11H77Zm0-24h17l10 11H77Zm44 44v-19l-11-11v18Zm-25 0v-19l11-11v18Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm241 79h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 44v-19l-11-11v18Zm-25 0v-19l11-11v18Zm25-63v19l-11 11v-19l11-11Zm-25 0v19l11 11v-19l-11-11Zm99 52 10-1-18 28 15 1-17 31v1h26l1 9a218 218 0 0 0 16 0v-9h23v-1l-17-31 15-1-18-28 10 1-23-33Zm-216 0 11-1-19 28 15 1-16 31h-1v1h26l1 9a217 217 0 0 0 17 0v-2l-1-3v-4h24l-1-1-17-31 16-1-19-28 11 1-24-33ZM0 1013h3v10a210 210 0 0 0 17 0v-6l-1-4h24-1l-16-32 15-1-18-27h10l-23-33-10 14v79Zm3 10Zm481 102-15-20-14 20Zm-184 0-15-20-15 20Zm-210 0-11-15-11 15Zm339-430h-17l-11-11h17l11 11Zm0-24h-17l-11 11h17l11-11Zm-64 24h18l10-11h-17Zm0-24h18l10 11h-17Zm44 43v-19l-11-11v19Zm-24 0v-19l11-11v19Zm24-63v19l-11 11v-18Zm-24 0v19l11 11v-18Zm10 158h10l-18 27 15 1-17 32h26l1 10a210 210 0 0 0 17 0l-1-2v-8h23l-17-32 16-1-19-27h11l-24-32Zm-68-10h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 44v-19l-11-11v19l11 11Zm-25 0v-19l11-11v19l-11 11Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm163-181 10-1-18 28 15 1-17 31v1h26l1 9a217 217 0 0 0 16 0v-9h23v-1l-17-31 15-1-18-28 10 1-8-13h-29l-9 13Zm-184 0 10-1-18 28 15 1-17 31v1h26l1 9a217 217 0 0 0 16 0v-9h23v-1l-17-31 15-1-18-28 10 1-8-13h-30l-8 13Zm-207 5h11l-19 27 16 1-17 32h26v10a210 210 0 0 0 17 0v-10h23l-17-32 15-1-18-27h10l-12-18H68l-13 18Zm86 229h10l-18 27 15 1-17 32h26l1 10a217 217 0 0 0 16 0v-10h23l-17-32 15-1-18-27h10l-23-32-23 32Zm-91-10H33l-11-11h18l10 11Zm0-24H33l-11 11h18l10-11ZM0 799h4l10-11H0Zm0-24h4l10 11H0Zm31 44v-19l-11-11v19l11 11Zm-25 0v-19l11-11v19L6 819Zm25-63v19l-11 11v-19Zm-25 0v19l11 11v-19Zm199-61h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 43v-19l-11-11v19l11 11Zm-25 0v-19l11-11v19l-11 11Zm25-63v19l-11 11v-18ZM724 89v18l11 11v-18l-11-11Zm387 301h11l-19 28h16l-17 32v1h23v-80l-14 19Zm-39 3h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm-336 43h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-17l-11 11Zm0-24h17l11 11h-17l-11-11Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm242 79h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-18l-11-11v18l11 11Zm-25 0v-18l11-11v18l-11 11Zm25-62v18l-11 11v-18l11-11Zm-25 0v18l11 11v-18l-11-11Zm98 51h11l-19 27 16 1-17 32h-1 27v10a210 210 0 0 0 17 0v-6l-1-4h24-1l-16-32 15-1-19-27h11l-23-33Zm-215 0h10l-18 27 15 1-17 32h26l1 10a210 210 0 0 0 16 0v-10h23l-17-32 15-1-18-27h10l-23-33-23 33Zm-166 14h2l1 9a217 217 0 0 0 16 0v-9h23v-1l-17-32h15l-18-28h10l-23-32-9 13-14 19h10l-18 28h15l-17 32v1Zm3 9Zm480 102-14-20-15 20Zm-184 0-15-20-14 20Zm-210 0-11-15-11 15Zm339-430h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18l11-11Zm-25 0v18l11 11v-18l-11-11Zm165 148h13v-11h-3l-10 11Zm0-24h13v11h-3l-10-11Zm-154 34 10-1-18 28 15 1-17 31v1h26l1 9a218 218 0 0 0 16 0v-9h23v-1l-17-31 15-1-18-28 10 1-23-33Zm-68-10h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm162-182h11l-19 28h16l-17 32h-1 27v10a225 225 0 0 0 17 0v-6l-1-4h24-1l-17-32h16l-19-28h11l-9-12h-29l-9 12Zm-184 0h11l-19 28h16l-17 32h-1 26l1 10a225 225 0 0 0 17 0v-2l-1-4v-4h24-1l-17-32h16l-19-28h11l-9-12h-29l-9 12Zm-206 5h10l-18 28h15l-17 32v1h26l1 9a210 210 0 0 0 16 0v-9h23v-1l-17-32h15l-18-28h10L652 0h-22Zm85 230 11-1-19 28 16 1-17 31v1h-1 27v9a210 210 0 0 0 17 0v-5l-1-4h24l-1-1-16-31 15-1-19-28 11 1-23-33-24 33Zm-91-10h-17l-10-11h17l10 11Zm0-24h-17l-10 11h17l10-11Zm-49 24h3l11-11h-18l-10 11Zm0-24h3l11 11h-18l-10-11Zm30 43v-18l-11-11v18l11 11Zm-25 0v-18l11-11v18l-11 11Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm200-62h-17l-11-11h17Zm0-24h-17l-11 11h17Zm-63 24h17l10-11h-17Zm0-24h17l10 11h-17Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18l11-11ZM509 393h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm-335 43h-17l-11-11h18Zm0-24h-17l-11 11h18Zm-63 24h17l10-11H77l-10 11Zm0-24h17l10 11H77l-10-11Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm241 79h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 43v-18l-11-11v18l11 11Zm-25 0v-18l11-11v18l-11 11Zm25-62v18l-11 11v-18l11-11Zm-25 0v18l11 11v-18l-11-11Zm99 51h10l-18 27 15 1-17 32h26l1 10a210 210 0 0 0 16 0v-10h23l-17-32 15-1-18-27h10l-23-33-23 33Zm-216 0h11l-19 27 15 1-16 32h-1 26l1 10a210 210 0 0 0 17 0v-2l-1-4v-4h24-1l-17-32 16-1-19-27h11l-24-33-23 33ZM0 451h3v9a217 217 0 0 0 17 0v-6l-1-3h24v-1h-1l-16-32h15l-19-28h11l-23-32-10 13v80Zm3 9Zm481 102-15-20-14 20Zm-184 0-15-20-15 20Zm-210 0-11-15-11 15Zm339-430h-17l-11-11h17l11 11Zm0-24h-17l-11 11h17l11-11Zm-64 24h18l10-11h-17Zm0-24h18l10 11h-17Zm44 43v-18l-11-11v18Zm-24 0v-18l11-11v18Zm24-62v18l-11 11v-18l11-11Zm-24 0v18l11 11v-18l-11-11Zm10 158 10-1-18 28 15 1-17 31v1h26l1 9a210 210 0 0 0 17 0l-1-2v-7h23v-1l-17-31 16-1-19-28 11 1-24-33Zm-68-10h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 43v-18l-11-11v18l11 11Zm-25 0v-18l11-11v18l-11 11Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18ZM446 12h10l-18 28h15l-17 32h26l1 10a217 217 0 0 0 16 0V72h23l-17-32h15l-18-28h10l-8-12h-29l-9 12Zm-184 0h10l-18 28h15l-17 32h26l1 10a217 217 0 0 0 16 0V72h23l-17-32h15l-18-28h10l-8-12h-30l-8 12ZM55 17h11L47 45h16L46 77v1h26v9a210 210 0 0 0 17 0v-9h23v-1L95 45h15L92 17h10L90 0H68L55 17Zm86 230 10-1-18 28 15 1-17 31v1h26l1 9a210 210 0 0 0 16 0v-9h23v-1l-17-31 15-1-18-28 10 1-23-33-23 33Zm-91-10H33l-11-11h18l10 11Zm0-24H33l-11 11h18l10-11ZM0 237h4l10-11H0Zm0-24h4l10 11H0Zm31 43v-18l-11-11v18l11 11Zm-25 0v-18l11-11v18L6 256Zm25-62v18l-11 11v-18Zm-25 0v18l11 11v-18Zm199-62h-17l-10-11h17Zm0-24h-17l-10 11h17Zm-63 24h17l11-11h-18Zm0-24h17l11 11h-18Zm44 43v-18l-11-11v18Zm-25 0v-18l11-11v18Zm25-62v18l-11 11v-18l11-11Zm0 0"/></g></g></g></svg>');
}

iframe {
	aspect-ratio: 16/9;
	width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: "Itim", cursive;
	font-weight: 400;
	font-style: normal;
}

h1 {
	text-align: center;
	font-size: 2em;
	margin: 0.5em auto;
}

main {
	aspect-ratio: 4/6;

	--container-size-w: min(
		var(--viewport-width),
		calc(var(--viewport-height) * 4 / 6)
	);

	--container-size-h: min(
		var(--viewport-height),
		calc(var(--viewport-width) * 6 / 4)
	);

	width: var(--container-size-w);
	height: var(--container-size-h);

	box-sizing: border-box;

	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin: 0 auto;

	--gap: 16px;
}

.calendar-container {
	width: calc(100% - 2 * var(--gap));
	height: calc(100% - 2 * var(--gap));

	--calendar-size-w: calc(var(--container-size-w) - var(--gap) * 2);
	--calendar-size-h: calc(var(--container-size-h) - var(--gap) * 2);

	--cell-width: calc(var(--calendar-size-w) / 4);
	--cell-height: calc(var(--calendar-size-h) / 6);
}

.day-content {
	--audio-player-cover-size: 100px;
	--audio-player-background: transparent;
	--audio-player-progress-color: rgba(255, 255, 255, 0.7);
	--audio-player-play-button-background: rgba(255, 255, 255, 0.7);
	--audio-player-play-button-hover-background: rgba(255, 255, 255, 0.9);
	--audio-player-play-button-icon-color: #000;

	position: relative;
	width: calc(100% - 2 * var(--gap));
	height: calc(100% - 2 * var(--gap));

	box-sizing: border-box;

	background: #fffcf0 url("/assets/paper-texture.png");
	padding: var(--size-fluid-3);
	overflow-y: auto;
	scrollbar-width: thin;

	/* Subtle shadow to give impression of sheet of paper */
	border: 1px solid white;
	border-bottom-color: #444;
	border-right-color: #444;
	box-shadow: 5px 7px 12px 1px rgb(0 0 0 / 65%);

	font-size: var(--font-size-2);

	&.locked {
		overflow: hidden;

		&::before {
			content: "🔒";
			display: grid;
			place-items: center;
			position: absolute;
			inset: 0;
			background: white url("/assets/paper-texture.png");
			z-index: 2;
			font-size: 3em;
		}
	}

	hr {
		margin: 2rem 0;
		border: none;
		height: 1px;
		background: #000;
		background: repeating-linear-gradient(90deg,#000,#000 4px,transparent 4px,transparent 8px);
	}

	.content-header:has(img) {
		margin: calc(-1 * var(--size-fluid-3));
		margin-bottom: 0;

		img {
			width: 100%;
			height: auto;
		}
	}

	table {
		thead {
			text-align: left;
		}
	}

	.story-content, .puzzle-content {
		display: grid;
		grid-template-columns: 1fr;
		grid-auto-flow: row;
		gap: var(--size-fluid-2);

		& > * {
			margin: 0;
			padding: 0;
		}

		ul, ol {
			padding-left: 1.5em;

			li {
				margin-bottom: 0.5em;
			}
		}
	}

	audio, img {
		width: 100%;
	}

	img {
		height: auto;
	}

	.book-left, .book-right {
		display: grid;
		grid-template-columns: minmax(25%, 200px) minmax(60%, 1fr);
		grid-template-areas: "image content";
		gap: var(--size-fluid-2);
		margin-bottom: var(--size-fluid-2);

		> * {
			margin: 0;
		}

		img {
			width: 100%;
			height: auto;
			grid-area: image;
		}

		p {
			grid-area: content;

			b {
				display: block;
				margin-bottom: 0.3em;
			}
		}
	}

	.book-right {
		grid-template-columns: minmax(60%, 1fr) minmax(25%, 200px);
		grid-template-areas: "content image";
	}

	.back-link {
		position: relative;
		display: block;
		margin-top: 2em;

		button {
			background: transparent;
			width: 100%;
			border: none;
			padding: 0.5em 1em;
			font-size: larger;
			text-decoration: underline;



			&::before {
				content: "←";
				font-weight: bold;
				display: inline-block;
				margin-right: 0.4em;
				animation: arrow 2s infinite;
			}
		}
	}

	.puzzle-content {
		.puzzle-form {
			border: 2px solid rgba(0, 0, 0, 0.4);
			border-radius: 8px;
			background: white;
			padding: 2px;
			box-sizing: border-box;
			transition: border-color 0.3s ease-out, background 0.3s ease-out;

			.puzzle-success-message {
				color: transparent;
				max-height: 0;
				transition: max-height 1s ease-out, color 0.25s ease-in, padding 0.25s ease-in;
				padding: 0 0.5em;
				box-sizing: border-box;
			}

			@supports (interpolate-size: allow-keywords) {
				.puzzle-success-message {
					max-height: none;
					height: 0;
					transition: height 0.25s ease-in, color 0.25s ease-in, padding 0.25s ease-in;
				}
			}

			&.success {
				border-color: #237625;
				background: #d4f3d0;

				.puzzle-success-message {
					max-height: 500px;
					padding: 0.2em 0.5em;
					color: black;
				}

				@supports (interpolate-size: allow-keywords) {
					.puzzle-success-message {
						height: auto;
					}
				}
			}

			input {
				width: 100%;
				padding: 0.5em;
				font-size: larger;
				box-sizing: border-box;
				border: none;
				background: transparent;

				:focus {
					outline: none;
				}
			}
		}
	}
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(6, 1fr);
	grid-template-areas:
		"door1 door2 door3 door4"
		"door5 door6 door7 door8"
		"door9 door10 door11 door12"
		"door13 door14 door15 door16"
		"door17 door18 door19 door20"
		"door21 door22 door23 door24";
	position: relative;
	gap: var(--gap);
	width: 100%;
	height: 100%;

	box-sizing: border-box;
	padding: var(--gap);

	background-image: url("/assets/adventni-kalendar-main-mensi.jpg");
	background-size: var(--calendar-size-w) var(--calendar-size-h);
	background-position: 0 0;
}

.door {
	--col: calc(mod(var(--door-number) - 1, 4));
	--row: calc(round(down, (var(--door-number) - 1) / 4));

	position: relative;

	a {
		text-decoration: none;
		position: absolute;
		inset: 0;

		.door-content {
			position: absolute;
			inset: 0;
			z-index: 1;
			background: url("/assets/paper-texture.png");
			transition: box-shadow 0.3s ease-out;
		}

		.door-front {
			position: absolute;
			inset: -2px;
			z-index: 3;
			width: calc(100% + 4px);
			height: calc(100% + 4px);
			display: flex;
			align-items: center;
			justify-content: center;
			transform-origin: left;
			transform-style: preserve-3d;
			transition: transform 0.3s ease-out;
			will-change: transform;
			backface-visibility: hidden;
			outline: 2px solid rgba(0, 0, 0, 0.2);
			border: 1px solid rgba(255, 255, 255, 0.5);
			cursor: pointer;
			background-image: url("/assets/adventni-kalendar-main-mensi.jpg");
			background-size: var(--calendar-size-w) var(--calendar-size-h);
			background-repeat: no-repeat;
			opacity: 1;
		}

		.door-number {
			color: rgba(255, 255, 255, 1);
			font-size: calc(var(--calendar-size-h) / 20);
			font-weight: bold;
			text-shadow: 1px 3px 3px rgba(0, 0, 0, 0.6);
		}
	}
}

/* Only apply hover effect to unlocked doors */
.door.unlocked a:hover .door-front {
	z-index: 4;
	transform: perspective(1000px) rotateY(-35deg);
}

.door.opened a .door-front {
	transform: perspective(1000px) rotateY(-30deg);
}



/* When actually opening, use a longer animation */
.door.opening a .door-front {
	transform: perspective(1000px) rotateY(-105deg) !important;
	transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional: add subtle shadow on hover */
.door.unlocked a:hover .door-content {
	box-shadow: inset -2px 0px 8px rgba(0, 0, 0, 0.6);
}

.door.opened a .door-content {
	box-shadow: inset -2px 0px 8px rgba(0, 0, 0, 0.8);
}

.door .door-front {
	background-position-x: calc(
		(var(--cell-width) * var(--col) * -1) -
			(var(--gap) * (1 - var(--col) * 0.25))
	);
	background-position-y: calc(
		(var(--cell-height) * var(--row) * -1) -
			(var(--gap) * (1 - var(--row) * 0.25))
	);
}

/**
 * Optional: Shake animation when door is locked.
 */
.door.shake a .door-front {
	animation: shake 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes shake {
	0%,
	100% {
		transform: translateX(0);
	}

	10%,
	30%,
	50%,
	70%,
	90% {
		transform: translateX(-5px);
	}

	20%,
	40%,
	60%,
	80% {
		transform: translateX(5px);
	}
}
