.klondike {
	margin: 0 auto;
	max-width: 820px;
}
.klondike .klondike-body {
	background-color: green;
	padding: 10px;
	border-radius: 6px;
	max-height: 620px;
	height: 200vh;
	margin: 6px 0 30px;
}
.klondike #table {
	display: grid;
	grid-template-rows: repeat(2, 1fr);
	grid-template-columns: repeat(7, 1fr);
	aspect-ratio: 7 / 2.8;
	gap: 0.6em 0.6em;
	margin: 0 auto;
	max-width: 820px;
}

.klondike #table>div {
	display: flex;
	justify-content: center;
	align-items: center;
}

.klondike #drawPile {
	grid-area: 1/1/2/2;
}
.klondike #discardPile {
	grid-area: 1/2/2/3;
}
.klondike #table>div#game-buttons {
	grid-area: 1/3/2/4;
}
.klondike #foundation-spades {
	grid-area: 1/4/2/5;
}
.klondike #foundation-hearts {
	grid-area: 1/5/2/6;
}
.klondike #foundation-diamonds {
	grid-area: 1/6/2/7;
}
.klondike #foundation-clubs {
	grid-area: 1/7/2/8;
}
.klondike #pile1 {
	grid-area: 2/1/3/2;
}
.klondike #pile2{
	grid-area: 2/2/3/3;
}
.klondike #pile3 {
	grid-area: 2/3/3/4;
}
.klondike #pile4 {
	grid-area: 2/4/3/5;
}
.klondike #pile5 {
	grid-area: 2/5/3/6;
}
.klondike #pile6 {
	grid-area: 2/6/3/7;
}
.klondike #pile7 {
	grid-area: 2/7/3/8;
}

.klondike .pile {
	width: 100%;
	border-radius: 6%;
	border: 1px solid #333;
	user-select: none;
	position: relative;
	cursor: pointer;
	font-size: 40px;
}

.klondike .card {
	width: 100%;
	height: 100%;
	display: inline-flex;
	justify-content: center;
	font-size: 20px;
	font-weight: bold;
	background-color: white;
	user-select: none;
	cursor: pointer;
	position: absolute;
}

.klondike div.card {
	border-radius: 6%;
	border: 2px solid #000;
}

.klondike img.card {
	width: 100%;
	border-radius: 6%;
	border: 1px solid #000;
}

.klondike .card.selected {
	box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
}

.klondike .clubs {
	color: black;
}

.klondike .diamonds {
	color: red;
}

.klondike .hearts {
	color: red;
}

.klondike .spades {
	color: black;
}

.klondike .facedown {
	color: #80917b;
	background-color: #80917b;
}
.klondike .game-over {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	justify-content: center;
	align-items: center;
	z-index: 1001;
	display: flex;
}
.klondike .card-title {
	text-align: center;
	font-size: 1.6em;
}
.klondike .game-over>div {
	background-color: white;
	padding: 20px;
	border-radius: 10px;
	text-align: center;
	color: black;
	width: 380px;
}
.klondike .rules h2 {
	line-height: 2em;
	font-size: 130%;
	font-weight: normal;
}

.klondike .rules p {
	margin-bottom: 1em;
}
@media (max-width: 600px) {
	.klondike .game-button {
		font-size: .8em;
		padding: .1em .2em;
	}
	.klondike #table {
		gap: 0.6em 0.3em;
	}
}
