.site-header,
.site-footer {
	width: min(100% - 2rem, 920px);
	margin-inline: auto;
	font-family: system-ui, sans-serif;
}

.site-header {
	padding-block: 1rem 0.5rem;
	border-bottom: 1px solid #989085;
}

.site-header h1 {
	margin: 0.3rem 0;
	font: 500 clamp(2.25rem, 6vw, 3.5rem)/1.1 Georgia, serif;
}

.site-header a,
.site-footer a {
	color: inherit;
	text-underline-offset: 0.2em;
}

.site-header nav:first-child a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.site-header .menu {
	position: static;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.6rem;
	align-items: center;
	color: inherit;
}

.menu .menuBtn {
	border: 1px solid #989085;
	border-radius: 0.2rem;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.875rem;
	min-height: 42px;
	padding-inline: 0.5rem;
}

.menu .menuBtn > option {
	color: #171512;
	background: #fff;
}

.menu button:hover {
	text-decoration: underline;
}

.button:focus-visible,
.menu .menuBtn:focus-visible,
.site-header a:focus-visible,
.site-footer a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.site-game {
	overflow-x: clip;
}

.site-footer {
	box-sizing: border-box;
	border-top: 1px solid #989085;
	padding-block: 0.8rem 1.5rem;
	font-size: 0.875rem;
}

.site-footer p {
	margin: 0.35rem 0;
}

#map {
	touch-action: none;
}

@media (max-width: 950px) {
	div#wrapper {
		display: flex;
		flex-direction: column;
		width: 100%;
		padding: 0;
	}

	div#notifications {
		position: relative;
		inset: auto;
		order: -1;
		box-sizing: border-box;
		width: 100%;
		height: 5.5em;
		padding: 0.6rem 1rem 0;
	}

	.game-stage {
		overflow-x: auto;
		margin-inline: 1rem;
	}

	div#content {
		/* Keep the original world geometry inside the scrolling game view. */
		width: 700px;
	}

	.eventPanel {
		box-sizing: border-box;
		left: 1rem;
		top: 10rem;
		max-width: calc(100% - 2rem);
	}

	.eventPanel:before {
		left: -1rem;
		width: calc(100vw - 2px);
	}
}

@media (max-width: 560px) {
	div#content {
		height: 650px;
	}

	div#header {
		width: calc(100vw - 2rem);
		height: auto;
		min-height: 20px;
	}

	div.button {
		box-sizing: border-box;
		min-height: 42px;
		height: auto;
		padding-block: 0.5rem;
	}
}
