*, *:before, *:after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}
:root {
	--dur: 2s;
	font-size: calc(10px + 1vmin);
}
body {
	background: #333;
	font: 1em Hind, Helvetica, sans-serif;
	line-height: 1.5;
	height: 100vh;
}
main {
	background: #9ab;
	margin: auto;
	overflow: hidden;
	position: relative;
	width: 100%;
	max-width: 600px;
	height: 100%;
}
h1 {
    font-size: 2em;
    line-height: 1.5;
    margin-bottom: 0.75em;
	text-align: center;
}
p {
	margin-bottom: 1.5em;
}
section {
	margin: 0 auto 1.5em auto;
	width: 8em;
}
figure, figure > span {
	vertical-align: middle;
}
figure {
	display: inline-table;
	margin-right: -3px;
	min-width: 2em;
	height: 4.5em;
	position: relative;
}
figure > span {
	border-radius: 50%;
	display: inline-block;
	min-width: 1em;
	height: 1em;
}
button, div {
	position: absolute;
}
.help, .help-window, .streak {
	z-index: 1;
}
/* help */
.help {
	background-color: transparent;
	border: 0;
	cursor: pointer;
	opacity: 0.5;
	font-size: 2.5em;
	line-height: 1.25;
	top: 0.25em;
	left: 0.25em;
	width: 1.25em;
	height: 1.25em;
	transition: opacity 0.15s linear;
	text-align: center;
}
.help:hover, .help:focus {
	opacity: 1;
	outline: 0;
}
.help-window {
	background-color: rgba(255,255,255,0.9);
	border-radius: 1em;
	margin: auto;
	padding: 0.75em;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 90%;
	max-width: 20em;
	height: 90%;
	max-height: 24em;
	transition: transform 0.3s ease-out;
	transform: scale(0);
}
.help:focus ~ .help-window {
	transform: scale(1);
}
.help:focus ~ .click-area {
	opacity: 0.5;
}
/* jello */
.jello-hitbox, .box {
	left: 50%;
}
.jello-hitbox {
	margin: -4em 0 0 -4em;
	bottom: 6em;
	width: 8em;
	height: 8em;
}
.jello {
	background:
		radial-gradient(1em 1em at 37% 40%,black 45%,transparent 50%),
		radial-gradient(1em 1em at 63% 40%,black 45%,transparent 50%),
		radial-gradient(100% 200% at 50% 0,transparent 0.65em, black 0.75em, black 47%,transparent 50%) 50% 64% / 2.5em 1em;
	background-repeat: no-repeat;
	background-color: #aaa;
	border-radius: 0.75em;
	box-shadow: 0 0 0 0.75em rgba(255,255,255,0.4) inset;
	transition: background-color 0.15s linear;
	transform-origin: 50% 100%;
	width: 100%;
	height: 100%;
}
figure > .box, figure > .jello {
	transform: scale(0.25,0.25);
}
figure > .jello {
	transform-origin: 0 0;
	width: 8em;
	height: 8em;
}
figure > .box {
	transform-origin: 50% 100%;
}
/* boxes */
.boxes, .box {
	bottom: 0;
}
.boxes {
	width: 100%;
}
.box {
	background-color: #777;
	border-radius: 0.5em;
	margin-left: -3em;
	width: 6em;
	height: 6em;
}
.box:last-of-type {
	left: 150%;
}

/* colors */
.red {
	background-color: #f44;
}
.yellow {
	background-color: #fc4;
}
.green {
	background-color: #8c8;
}
.blue {
	background-color: #48f;
}
/* other */
.ascii-arrow {
	transform: rotate(-35deg);
	transform-origin: 0 50%;
}
.click-area {
	background-color: #000;
	opacity: 0;
	width: 100%;
	height: 100%;
}
.streak {
	font-size: 4em;
	text-align: center;
	width: 100%;
}
/* animations */
.run > .jello-hitbox {
	animation: jump calc(var(--dur)/2) cubic-bezier(.2,.45,.65,.99) 2 alternate;
}
.run > .jello-hitbox > .jello {
	animation: squish var(--dur) ease-out;
}
.run > .boxes {
	animation: scroll var(--dur) linear;
}

@keyframes jump {
	from, 4% {
		transform: translateY(0);
	}
	to {
		transform: translateY(-12em);
	}
}
@keyframes squish {
	from, 40%, to {
		transform: scale(1,1);
	}
	8% {
		transform: scale(1.5,0.5);
	}
	16% {
		transform: scale(0.75,1.25);
	}
	24% {
		transform: scale(1.25,0.75);
	}
	32% {
		transform: scale(0.875,1.125);
	}
}
@keyframes scroll {
	from, 8% {
		transform: translateX(0);
	}
	to {
		transform: translateX(-100%)
	}
}