html {
	scrollbar-gutter: stable;
}
html.dialogOpen {
	overflow-y: hidden;
}

main {
	max-width: 100%;
	width: 30.5em;
	margin: auto;
	background-color: var(--theme-shadow);
	backdrop-filter: blur(var(--theme-shadow-blur));
}

main > section {
	padding-bottom: 2.5em;
}

h2 {
	width: 100%;
	margin: 0;
	padding: .2em;
	text-align: center;
}

hr {
	width: 100vw;
	transform: translate(-25%);
}

.settingsBlock {
	width: 30em;
	max-width: 100%;
	margin: auto;
	text-align: center;
}

.settingsBlock > div:nth-child(even) {
	background-color: rgba(0, 0, 0, 0.25);
}

.settingsBlock > div {
	position: relative;
	padding: .1em .4em;
	text-align: left;
	display: flow-root; /* Establishes new block formatting context so that float elements fit */
}

.hideDevOptions .devOption {
	display: none;
}

input[type="text"], select, .settingsInput {
	float: right;
}

.keybind {
	width: 10em;
}

#languageWarnings {
	position: absolute;
	top: 100%;
	font-size: .6em;
	text-decoration: none;
}

.invalidHotkey {
	color: red;
}

.profilePictureLists {
	overflow-y: scroll;
}
.profilePictureLists > h2 {
	padding-bottom: 0;
}
.profilePictureLists > h2 > a {
	text-decoration: none;
}
.profilePictureLists > h2 > a:hover {
	text-decoration: underline;
}
.profilePictureList {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	padding: .5em;
	padding-top: 0;
	gap: .5em;
}

.profilePictureBtn {
	background-color: transparent;
	padding: 0;
	width: min(8vw, 8em);
	aspect-ratio: 1;
	border-radius: 50%;
	border: 3px solid var(--theme-border-color);
	position: relative;
	overflow: clip;
	cursor: pointer;
}
.profilePictureBtn > img {
	width: 180%;
	height: calc(180% * (1185/813));
	position: absolute;
	top: calc(-22.5% * (1185/813 * 1.8 - 1)); /* This recreates background-position-y: 22.5% */
	left: calc(var(--left) * .8);
}
#profilePictureDialog .profilePictureBtn > img {
	filter: brightness(.7);
	transition: filter, .25s;
}
#profilePictureDialog .profilePictureBtn:hover > img, .selectedProfilePic img {
	filter: brightness(1);
}
.selectedProfilePic {
	border: 3px solid #ffd686;
	box-shadow: 0px 0px .75em #ffd686;
}

#profilePictureSwitcher {
	display: flex;
}
#profilePictureSwitcher > button {
	width: 100%;
	border-top: 0;
	border-left: 0;
}
#profilePictureSwitcher > :last-child {
	border-right: 0;
}

#profilePictureButton {
	color: inherit;
	font-size: .75em;
}
#profilePictureButton::after {
	content: var(--change-label);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #eee;
	filter: opacity(0);
	transition: filter, .15s;
}
#profilePictureButton:hover::after {
	filter: opacity(1);
}
#profilePictureButton > img {
	transition: filter, .15s;
}
#profilePictureButton:hover > img {
	filter: brightness(.25);
}