* {
	border: 0;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
:root {
	--hue: 223;
	--bg: hsl(var(--hue),10%,90%);
	--fg: hsl(var(--hue),10%,10%);
	--inputBg: hsl(var(--hue),10%,80%);
	--inputBdr: hsl(var(--hue),10%,70%);
	--inputCheck: hsl(var(--hue),90%,55%);
	--primary: hsl(var(--hue),90%,55%);
	font-size: calc(16px + (20 - 16) * (100vw - 320px) / (1280 - 320));
}
body, input {
	color: var(--fg);
	font: 1em/1.5 Hind, sans-serif;
}
body {
	background: var(--bg);
	display: grid;
	place-items: end center;
	height: 100vh;
	perspective: 800px;
}
form {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 2em;
}
label, input[type="checkbox"] {
	cursor: pointer;
}
label {
	transform: translate3d(0,0.1em,0);
}
input {
	background: var(--inputBg);
	border-radius: 0.2em;
	box-shadow: 0 0 0 2px var(--inputBdr) inset;
	transition: box-shadow 0.1s linear;
	-webkit-appearance: none;
	appearance: none;
}
input:focus {
	box-shadow: 0 0 0 2px var(--primary) inset;
	outline: none;
}
input[type="number"] {
	margin-right: 1.5em;
	padding: 0.5em 0.75em;
	width: 5.25em;
}
input[type="checkbox"] {
	margin-right: 0.375em;
	text-align: center;
	width: 1em;
	height: 1em;
}
input[type="checkbox"]:checked:before {
	color: var(--inputCheck);
	content: "\2713";
	display: block;
	line-height: 1.33;
}
input[type="checkbox"]:checked ~ .can {
	transform: rotate(-90deg);
}
.can, .can__sector, .sr {
	position: absolute;
}
.can {
	top: calc(50% - 7.25em);
	left: calc(50% - 8.5em);
	width: 17em;
	height: 10em;
	transform-style: preserve-3d;
	transition: transform 0.3s ease-in-out;
	z-index: -1;
}
.can__sector {
	animation: spin 18s linear infinite;
	background: linear-gradient(var(--fg) 10%,var(--bg) 90%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: #0000;
	font: bold 5em/1 "B612 Mono", monospace;
	text-align: center;
	bottom: 50%;
	left: 0;
	transform-origin: 50% 100%;
	width: 100%;
}
.can__sector:nth-child(2) { animation-delay: -1s }
.can__sector:nth-child(3) { animation-delay: -2s }
.can__sector:nth-child(4) { animation-delay: -3s }
.can__sector:nth-child(5) { animation-delay: -4s }
.can__sector:nth-child(6) { animation-delay: -5s }
.can__sector:nth-child(7) { animation-delay: -6s }
.can__sector:nth-child(8) { animation-delay: -7s }
.can__sector:nth-child(9) { animation-delay: -8s }
.can__sector:nth-child(10) { animation-delay: -9s }
.can__sector:nth-child(11) { animation-delay: -10s }
.can__sector:nth-child(12) { animation-delay: -11s }
.can__sector:nth-child(13) { animation-delay: -12s }
.can__sector:nth-child(14) { animation-delay: -13s }
.can__sector:nth-child(15) { animation-delay: -14s }
.can__sector:nth-child(16) { animation-delay: -15s }
.can__sector:nth-child(17) { animation-delay: -16s }
.can__sector:nth-child(18) { animation-delay: -17s }

.sr {
	clip: rect(1px,1px,1px,1px);
	overflow: hidden;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
}

/* Animation  */
@keyframes spin {
	from { transform: rotateX(0); }
	to { transform: rotateX(-1turn); }
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
	:root {
		--bg: hsl(var(--hue),10%,10%);
		--fg: hsl(var(--hue),10%,90%);
		--inputBg: hsl(var(--hue),10%,20%);
		--inputBdr: hsl(var(--hue),10%,30%);
		--inputCheck: hsl(var(--hue),90%,65%);
	}
}

/* Degraded look for Firefox due to lack of support for 
animating the original */
@supports (-moz-appearance: none) {
	.can__sector {
		background: none;
		-webkit-text-fill-color: currentColor;
	}
}