body {
	max-height: 100vh;
}

main {
	padding: 0;
}

#rules_main {
	display: flex;
	justify-content: center;
	grid-gap: 2rem;
	font-size: 1.125rem;

	flex: 0 2 auto;
	overflow: auto;

	margin-top: 1.5rem;
	padding: 0;
}

.page-header {
	display: none;
}

#rules {
	box-sizing: border-box;
	width: 100vw;
	max-width: 800px;
	padding: 3rem 5rem;
	background-color: white;
	border-radius: 10px;
}

section:first-child .sect-header {
	margin-top: 0;
}

.sect-header {
	color: var(--sec);
	margin: 3rem 0 1rem 0;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.sect-header i.material-icons {
	font-size: 4rem;
}

.sect-subheader {
	margin: 1rem 0;

	display: flex;
	align-items: center;

	color: var(--sec);
}

.sect-subheader i.material-icons {
	font-size: 2.5rem;
	margin-right: 0.5rem;
}

.sect-body li:not(:last-child) {
	margin-bottom: 0.5rem;
}

.sect-extra {
	background-color: #f4f4f4;
	border-left: 5px solid var(--pri);
}

.extra-header {
	color: var(--pri-dark);
	padding: 0.5rem;

	display: flex;
	align-items: center;
	column-gap: 0.25rem;
}

.extra-header i.material-icons {
	font-size: 1.75rem;
}

.extra-header:hover {
	background-color: #d1d1d1;
	cursor: pointer;
}

.extra-header-text {
	flex: 1 1 auto;
}

.extra-body {
	padding: 1rem;
	display: none;
}

.extra-body .table-container {
	max-height: none;
}

.extra-body table th {
	white-space: pre-wrap;
}

.extra-body table td {
	text-align: center;
}

#rules_nav {
	position: sticky;
	top: 0;

	overflow: auto;
}

#rules_nav .nav-header {
	background-color: var(--pri);
	color: white;

	text-align: center;
	padding: 1rem;
	margin-bottom: 0.5rem;
}

#rules_nav .nav-item {
	box-sizing: border-box;

	padding: 0.3rem;
	padding-left: 0.5rem;
	border-left: 5px solid #afafaf;
	margin-bottom: 0.25rem;

	cursor: pointer;
}

#rules_nav .nav-item:hover,
#rules_nav .nav-item-sub:hover {
	background-color: #d1d1d1;
}

#rules_nav .nav-item.focused,
#rules_nav .nav-item-sub.focused {
	font-weight: bold;
	color: var(--pri-dark);
	border-color: var(--pri-dark);
}

#rules_nav .nav-item-sub {
	box-sizing: border-box;

	font-size: 1rem;
	border-left: 3px solid #afafaf;
	padding: 0.1em;
	padding-left: 0.5rem;
	margin-bottom: 0.5rem;
	margin-left: 1rem;

	cursor: pointer;
}

#problem_unlock_diagram {
	background-color: white;
	margin-top: 1rem;
}

#problem_unlock_diagram strike {
	color: #a1a1a1;
	font-weight: normal;
}

#problem_unlock_diagram div {
	padding: 0.5rem;
	border: 2px solid var(--pri);
}

#problem_unlock_diagram div:first-child {
	border-radius: 10px 10px 0 0;
}

#problem_unlock_diagram div:last-child {
	border-radius: 0 0 10px 10px;
}

#problem_unlock_diagram div:not(:first-child) {
	border-top: none;
}

#problem_unlock_diagram div:nth-child(even) {
	text-align: right;
	font-weight: bold;
}

#rules_footer {
	display: flex;
	align-items: center;
	justify-content: center;
	grid-gap: 0.5rem;

	text-align: center;

	color: var(--sec);
	margin-top: 1rem;
	padding: 1rem;
}

#rules_footer > i.material-icons {
	font-size: 4rem;
}

main {
	max-width: 800px;
}

.rules-box {
	display: flex;
	flex-direction: row;
	padding: 10px 5px 10px 0px;
}

.rules-icon-box {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}
.rules-text-box {
	flex: 9;
}
.rules-box > .rules-icon-box > .material-icons {
	font-size: 30px;
}

.rules-box.dos {
	background-color: #d9ead3;
}
.rules-box.dos > .rules-icon-box > .material-icons {
	color: #6aa84f;
}

.rules-box.donts {
	background-color: #f4cccc;
}
.rules-box.donts > .rules-icon-box > .material-icons {
	color: #e06666;
}

.rules-img-container {
	display: flex;
	padding: 10px;
}
.rules-img > img {
	max-width: 100%;
	object-fit: contain;
}

.slideshow {
	position: relative;
}

.slideshow-button-container {
	position: absolute;
	width: 100%;
	height: 100%;

	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 10;
}

.slideshow-prev,
.slideshow-next {
	z-index: 10;
	cursor: pointer;
	width: auto;
	padding: 0.5rem;
	color: white;
	font-weight: bold;
	font-size: 1.25rem;
	background-color: rgba(0, 0, 0, 0.4);
	user-select: none;
	-webkit-user-select: none;
}

.slideshow-next {
	right: 0;
}

.slideshow-prev:hover,
.slideshow-next:hover {
	background-color: rgba(0, 0, 0, 0.8);
}

.slideshow-img:not(.slideshow-active),
.slideshow-caption:not(.slideshow-active) {
	display: none;
}

.slideshow-item .slideshow-active,
.slideshow-caption .slideshow-active {
	display: block;
}

.slideshow-img {
	width: 100%;
}

.slideshow-caption {
	text-align: center;
	font-size: 0.85em;
	font-style: italic;
}

@media (max-width: 1100px) {
	body {
		max-height: none;
	}

	#rules_main {
		flex: 1 1 auto;
		margin-top: 0;
	}

	#rules_nav {
		display: none;
	}

	#rules_container {
		max-width: 800px;
		width: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.page-header {
		display: block;
	}
}

@media (max-width: 700px) {
	#rules {
		padding: 3em 1.5rem;
	}

	#rules_footer {
		flex-wrap: wrap;
	}

	.rules-img-container {
		flex-direction: column;
	}

	.rules-box {
		flex-direction: column;
		padding: 10px;
	}
}
