.mainpanel {
	display: flex;
	justify-content: flex-start;
	align-items: stretch;
	flex-direction: column;
	max-width: 360px;
	box-sizing: border-box;
}
#score-panel {
	text-align: left;
	margin: 0px 5px;
	color: var(--text-color);
}

#score-panel .stars {
	padding: 0;
	display: inline-block;
	margin: 0 5px 0 0;
}

#score-panel .stars li {
	list-style: none;
	display: inline-block;
}

#score-panel .restart {
	float: right;
	cursor: pointer;
	border: 0;
	background: none;
}

#score-panel .restart svg {
	fill: var(--text-color);
}

#score-panel .restart svg:hover {
	fill: var(--a-hover-color);
}

.puzzle {
	/*max-width: 360px;*/
	background-color: var(--browsergame-board-bgcolor);
	padding: 15px;
	margin: 5px 0px;
	border-radius: 8px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	overflow: hidden;
	box-sizing: border-box;
}

.puzzle:focus-visible {
	outline: 2px dashed var(--a-hover-color);
}

.grid {
	grid-column-end: span 3;
	display: grid;
	grid-gap: 2px;
	grid-template-areas:
		"A B C"
		"D E F"
		"G H I";
	box-sizing: border-box;
}

.tile {
	height: 0;
	padding-top: 0px;
	padding-bottom: 100%;
	grid-area: var(--area, auto);
	border: none;
	background: var(--slidingpuzzle-img);
	background-size: 300%;
	border-radius: 3px;
	margin: 0;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
	cursor: pointer;
}

.tile--empty {
	cursor: auto;
}

.tile:focus {
	outline: 2px;
	border: 0px;
}

.tile[disabled] {
	cursor: not-allowed;
}

.tile--1 { background-position: top left; }
.tile--2 { background-position: top center; }
.tile--3 { background-position: top right; }
.tile--4 { background-position: center left; }
.tile--5 { background-position: center; }
.tile--6 { background-position: center right; }
.tile--7 { background-position: bottom left; }
.tile--8 { background-position: bottom center; }
.tile--empty { background: transparent; }

@media only screen and (max-width: 400px) {
	.mainpanel {
		margin: 0 -15px;
		max-width: none;
	}
	
	.puzzle {
		border-radius: 0;

	}
	
	#score-panel {
		margin: 0 15px;
	}
}