* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f2f3f5;
	color: #222;
	font-family:
	system-ui,
	-apple-system,
	BlinkMacSystemFont,
	"Segoe UI",
	sans-serif;
}

main {
	width: min(900px, calc(100% - 30px));
	margin: 30px auto 60px;
}

.kalenteri,
.teksti {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.kalenteri {
	padding: 20px;
}

.kalenteri-otsikko {
	display: grid;
	grid-template-columns: 50px 1fr 50px;
	align-items: center;
	text-align: center;
}

.kalenteri-otsikko h1 {
	margin: 0;
	font-size: 1.6rem;
}

.kalenteri-otsikko button {
	width: 45px;
	height: 45px;
	border: 0;
	border-radius: 8px;
	background: #eee;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.kalenteri-otsikko button:hover {
	background: #ddd;
}

.viikonpaivat,
.paivat {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.viikonpaivat {
	margin-top: 20px;
	margin-bottom: 5px;
	text-align: center;
	font-weight: 600;
	color: #555;
}

.paiva,
.tyhja {
	min-height: 60px;
}

.paiva {
	border: 1px solid #ddd;
	background: #fff;
	font-size: 1rem;
	cursor: pointer;
}

.paiva:hover {
	background: #e8f0ff;
}

.teksti {
	margin-top: 25px;
	padding: 30px;
	line-height: 1.7;
	min-height: 100px;
}

.teksti h1,
.teksti h2,
.teksti h3 {
	line-height: 1.3;
}

.teksti img {
	max-width: 100%;											                                height: auto;
}

.teksti.ladataan {
	opacity: 0.5;
}

@media (max-width: 600px) {

	main {
		width: calc(100% - 16px);
		margin-top: 8px;
	}

	.kalenteri {
		padding: 10px;
	}

	.paiva,
	.tyhja {
		min-height: 48px;
	}

	.teksti {
		padding: 20px;
	}
}
