.profile-photo-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.profile-photo-preview,
.profile-photo-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #7357e8, #b08cff);
  font-weight: 800;
}

.profile-photo-preview {
  width: 76px;
  height: 76px;
  font-size: 24px;
}

.profile-photo-preview .profile-photo-avatar {
  width: 100%;
  height: 100%;
  font-size: inherit;
}

.profile-photo-preview img,
.profile-photo-avatar img,
.topbar .avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-photo-copy {
  min-width: 0;
  flex: 1;
}

.profile-photo-copy h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.profile-photo-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-photo-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.profile-photo-form input[type="file"] {
  width: min(100%, 270px);
  min-height: 42px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
}

.profile-photo-form input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font: 700 11px 'DM Sans', sans-serif;
  cursor: pointer;
}

.profile-photo-hint {
  width: 100%;
  color: var(--muted);
  font-size: 10px;
}

.profile-photo-error {
  width: 100%;
  min-height: 16px;
  margin: 0;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

.profile-photo-current {
  width: 100%;
  min-height: 16px;
  color: var(--success);
  font-size: 11px;
}

.profile-header .profile-photo-avatar {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.topbar .avatar img {
  border-radius: inherit;
}

@media (max-width: 570px) {
  .profile-photo-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .profile-photo-copy,
  .profile-photo-form,
  .profile-photo-form input[type="file"] {
    width: 100%;
  }

  .profile-photo-form .button {
    flex: 1;
  }
}
