.account-profile-page {
  max-width: 1000px;
}

.account-profile-hero.v41-card {
  margin-top: 14px;
  padding: 0;
}

.account-profile-cover,
.account-profile-cover-preview {
  background:
    radial-gradient(ellipse at 85% 130%, #ffd5a5 0 28%, transparent 28.5%),
    radial-gradient(ellipse at 15% 125%, #c9dfb4 0 38%, transparent 38.5%),
    linear-gradient(112deg, #214c3c, #3b785a 65%, #9abe8a);
}

.account-profile-cover {
  position: relative;
  height: clamp(128px, 20vw, 216px);
  border-radius: 17px 17px 0 0;
}

.account-profile-cover-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.account-profile-cover-image img,
.account-profile-cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-profile-cover-edit {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px #14382923;
}

.account-profile-cover-edit svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.account-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 0 24px 24px;
}

.account-profile-portrait {
  position: relative;
  align-self: start;
  margin-top: -48px;
}

.account-profile-portrait .profile-photo-frame {
  width: 132px;
  height: 132px;
  border: 6px solid #fff;
}

.account-profile-camera {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #d8e2d6;
  border-radius: 50%;
  background: #fff;
  color: #194e3e;
  box-shadow: 0 4px 14px #14382923;
  cursor: pointer;
}

.account-profile-camera svg {
  width: 22px;
  height: 22px;
}

.account-profile-person {
  min-width: 0;
  padding-top: 16px;
}

.account-profile-person h1 {
  margin: 4px 0;
  font-size: clamp(24px, 4vw, 39px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-profile-person p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.account-profile-person .account-profile-role {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 11px;
  border-radius: 99px;
  background: #eaf3e8;
  color: #235641;
  font-size: .875rem;
  font-weight: 650;
}

.account-profile-page .btn {
  min-height: 44px;
}

.account-profile-page [data-profile-password] {
  scroll-margin-top: 100px;
}

.account-profile-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: 88dvh;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  margin: auto;
  padding: 22px;
  border: 1px solid #d5e1d3;
  border-radius: 20px;
  background: #fffdf8;
  color: var(--ink, #17372d);
  box-shadow: 0 24px 80px #102e2555;
}

.account-profile-dialog::backdrop {
  background: #102c248c;
}

.account-profile-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dce4d8;
}

.account-profile-dialog h2,
.account-profile-dialog h3,
.account-profile-dialog p {
  margin: 0;
}

.account-profile-dialog h2 {
  font-size: clamp(20px, 5vw, 26px);
}

.account-profile-dialog .account-profile-form {
  min-width: 0;
  padding-top: 16px;
  gap: 10px;
}

.account-profile-form + .account-profile-form {
  margin-top: 16px;
  border-top: 1px solid #dce4d8;
}

.account-profile-photo-edit {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-profile-photo-edit .profile-photo-frame {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  font-size: 30px;
}

.account-profile-photo-edit p {
  margin-top: 6px;
}

.account-profile-form[data-profile-media="cover"] .account-profile-photo-edit {
  display: grid;
  gap: 12px;
}

.account-profile-cover-preview {
  width: 100%;
  aspect-ratio: 4 / 1;
  overflow: hidden;
  border-radius: 12px;
}

.account-profile-dialog .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.account-profile-dialog .v41-state:empty {
  display: none;
}

.account-profile-dialog [hidden] {
  display: none;
}

@media (min-width: 901px) and (max-width: 1120px) {
  body:has(.account-profile-page) .desktop-nav {
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 2px;
  }
}

@media (max-width: 600px) {
  .account-profile-cover-edit {
    top: 10px;
    right: 10px;
    bottom: auto;
    padding-inline: 10px;
    font-size: .875rem;
  }

  .account-profile-cover-preview {
    aspect-ratio: 5 / 2;
  }

  .account-profile-identity {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    padding: 0 16px 16px;
    text-align: center;
  }

  .account-profile-portrait .profile-photo-frame {
    width: 108px;
    height: 108px;
  }

  .account-profile-person {
    max-width: 100%;
    padding-top: 0;
  }

  .account-profile-edit {
    width: 100%;
  }

  .account-profile-dialog {
    padding: 16px;
  }
}
