.profile-url-fallback {
  display: none !important;
}

.profile-media-editor {
  display: grid;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.profile-media-heading,
.profile-gallery-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.profile-media-heading div {
  display: grid;
  gap: 0.18rem;
}

.profile-media-heading span,
.profile-media-heading small,
.profile-gallery-title span,
.profile-field-hint,
.profile-bio-counter {
  color: var(--gray);
  font-size: 0.72rem;
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-main-photo {
  position: relative;
  display: grid !important;
  place-items: center;
  width: 112px;
  flex: 0 0 112px;
  cursor: pointer;
}

.profile-main-photo input,
.profile-gallery-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.profile-photo-preview {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #845ef7);
  border: 3px solid var(--white);
  border-radius: 28px;
  box-shadow: 0 14px 30px var(--blue-glow);
  font-size: 1.4rem;
  font-weight: 900;
}

.profile-photo-preview img,
.profile-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-action {
  margin-top: 0.5rem;
  color: var(--blue);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.profile-photo-help {
  display: grid;
  gap: 0.3rem;
}

.profile-photo-help p {
  max-width: 360px;
  color: var(--gray);
  font-size: 0.82rem;
  line-height: 1.5;
}

.profile-gallery-editor {
  display: grid;
  gap: 0.65rem;
}

.profile-gallery-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.profile-gallery-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  color: var(--gray);
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-gallery-slot button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #fff;
  background: #111b;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
}

.profile-gallery-slot.is-empty {
  border-style: dashed;
}

.profile-gallery-add {
  position: relative;
  display: inline-flex !important;
  justify-self: start;
  cursor: pointer;
}

.profile-gallery-add span {
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-friendly-field,
.profile-wide-field {
  position: relative;
}

.profile-field-hint {
  line-height: 1.4;
}

.profile-bio-counter {
  justify-self: end;
  margin-top: -1.25rem;
  padding-right: 0.35rem;
}

@media (max-width: 560px) {
  .profile-photo-row {
    align-items: flex-start;
  }

  .profile-gallery-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
