.profile {
	min-height: 100vh;
	max-width: 540px;
	margin: 0 auto;
}

.personal-info.is-editing-avatar {
	background: #fff;
}

.profile-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	background: #fff;
}

.profile-header h1 {
	margin: 0;
}

.profile-back {
	position: absolute;
	inset: 0 auto 0 0;
	display: grid;
	place-items: center;
	width: 42px;
	color: inherit;
}

.profile-back::before,
.profile-row::after {
	content: "";
	width: 16px;
	height: 16px;
	background: url("../images/right.svg") center / contain no-repeat;
}

.profile-back::before {
	transform: rotate(180deg);
}

.profile-summary {
	margin-top: 7px;
	background: #fff;
}

.profile-row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 57px;
	padding: 7px 17px 7px 16px;
	color: inherit;
	text-decoration: none;
}

.profile-row + .profile-row {
	border-top: 1px solid #eee;
}

.profile-row::after {
	flex: 0 0 auto;
}

.profile-avatar {
	display: block;
	width: 39px;
	height: 39px;
	object-fit: cover;
	background: #f9edd8;
}

.profile-row .profile-avatar,
.profile-nickname {
	margin-left: auto;
}

.profile-nickname {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-avatar-editor,
.profile-nickname-editor {
	padding: 22px 19px 32px;
}

.profile-avatar-preview {
	width: 134px;
	height: 134px;
}

.profile-avatar-label {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 300px;
	margin: 24px auto 26px;
	font-size: 16px;
}

.profile-avatar-label::before,
.profile-avatar-label::after {
	content: "";
	flex: 1;
	border-top: 1px solid #d3d6db;
}

.profile-avatar-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 23px 15px;
	max-width: 328px;
	margin: 0 auto;
}

.profile-avatar-choice {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.profile-avatar-choice .profile-avatar {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
}

.profile-avatar-choice input:checked + img {
	outline: 2px solid #458fc6;
	outline-offset: 2px;
}

.profile-avatar-choice input:focus-visible + img {
	outline: 2px dashed #225b87;
	outline-offset: 3px;
}

.profile-save {
	min-height: 51px;
	margin-top: 42px;
	background-color: #458fc6;
	border-color: transparent;
}

.profile-nickname-editor input {
	margin-top: 8px;
	height: 46px;
}

.profile-nickname-editor .profile-save {
	margin-top: 24px;
}
