
html, body {
	margin: 0;
	padding: 0;
}

html {
	height: 100%;
}

body {
	min-height: 100%;
	background-color: #484;
	padding-bottom: 1.5em;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
}

.footer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: #aaa;
	will-change: transform;
	box-shadow: 0 0 0.3em 0 #000;
	height: 1.5em;
	z-index: 1337;
}

.game {
	padding-top: 0.2em;
	display: inline-block;
	font-size: 7.1vh;
	position: relative;
}
body.vw .game {
	font-size: 5.7vw;
}

.card:not(.transitionReset) {
	transform: translate(0, 0) !important;
	transition: transform 0.5s;
}

.card, .drop, .spacer {
	width: 2em;
	height: 3em;
	border-radius: 0.2em;
}
.drop {
	box-shadow: 0 0 0.2em 0 #000 inset;
}
.drop, .spacer {
	margin: 0.2em;
	position: relative;
	display: inline-flex;
}

.card {
	will-change: transform;
	position: absolute;
	perspective: 10em;
}

.card .card {
	margin-top: 0.2em;
}
.card:not(.flipped) > .card:not(.flipped) {
	margin-top: 0.5em;
}

.card .front, .card .back, .card .wrapper {
	width: inherit;
	height: inherit;
	position: absolute;
	border-radius: inherit;
	will-change: transform;
}

.card .wrapper {
	transform-style: preserve-3d;
	transition: transform 0.5s;
	box-shadow: 0 0 0.2em 0 #000, inset 0 0 0.1em 0 rgba(0, 0, 0, 0.2);
	transform: rotate(0deg);
	perspective: 10em;
}
.card .front, .card .back {
	overflow: hidden;
	backface-visibility: hidden;
}

.card .back {
	background-color: #666;
	transform: rotateY(180deg);
}
.card .front[data-black='true'] {
	background-color: #aaa;
}
.card .front[data-black='false'] {
	background-color: #a99;
	color: #a00;
}

.card.flipped > .wrapper {
	transform: rotateY(-180deg);
}

.front:before, .front:after {
	content: attr(data-face);
	box-sizing: border-box;
	padding-right: 0.1em;
	font-size: 70%;
	line-height: 1em;
	position: absolute;
	height: inherit;
	width: inherit;
	text-align: right;
	transform: rotate(0deg);
}

.front:after {
	transform-origin: 50% 50%;
	transform: rotate(180deg);
}

.card .bgr {
	background-color: rgba(0, 0, 0, 0.4);
	opacity: 0.4;
	position: absolute;
	top: 25%;
	left: -50%;
	width: 200%;
	height: 50%;
	transform-origin: 50% 50%;
	transform: rotate(20deg);
	box-shadow: 0 0 0.1em 0 #000 inset, 0 0 0.05em 0 #000;
	box-sizing: border-box;
	border: 0.02em solid #000;
}

.card .back .bgr {
	transform: rotate(-20deg);
}
